Home
Tutorials
Core Java
Introduction To Java
Java Evolution
Overview of Java
Constants, Variables and Data Types
Java Operators
Branching Statements
Looping Statements
Classes, Objects and Methods
Inheritance
Array, String and Vectors
Java Interfaces
Java Packages
Applet Programming
Graphics Programming
Advanced Java
Java AWT
Java Event Handling
Java File Handling
Java MultiThreading
Java Swing-I
Java Swing-II
Exception Handling
Socket Programming
Java Database
Java RMI
Java Servlets
Java Beans
Programms
Projects
Downloads
Contact
Java Programming
!doctype>
First Complete Class Program in Java
//============================================ /* File Name : CompleteClassProgram.java WebSite : http://javaproglang.blogspot.in/ Created By : Bintu Chaudhary Email ID : bintu.chaudhary.mks@gmail.com */ //============================================ import java.io.*; class base { int a,b; void get() //Defination of Methods { a = 100; b = 200; } void sum() //Defination of another method { int c = a + b; System.out.println("Sum = "+c); } } class CompleteClassProgram //class with main method { public static void main(String args[]) { base obj=new base(); //creating object obj.get(); //Accessing Methods obj.sum(); } }
Output of "CompleteClassProgram.java"
Download Complete Program
-
Read more »
No comments:
Post a Comment
No comments:
Post a Comment