Java program main function with object
/** * @Prof. Jayesh * Here two classes are created each having main function * A class calls the main() of another … Read more
/** * @Prof. Jayesh * Here two classes are created each having main function * A class calls the main() of another … Read more
PROGRAM: To show nested methods. /** * @Prof. Jayesh * Here we call a method from main(). * Methods are in same class so … Read more
PROGRAM: To show use of Continue statement. /** * @Prof. Jayesh * continue is a control statement. * continue brings compiler to … Read more
PROGRAM: To show use of Do While. public class DoWhile { public static void main(String args[]) { int i=1; do … Read more
PROGRAM: To show use of decrement operator. /** * @Prof. Jayesh * Decrement operator uses ‘ – ‘. */ public class DecrementOperator … Read more
PROGRAM: To show constant. /** * @Prof. Jayesh * Here age is constant, which have fix value 28. */ public class ConstantClass … Read more
PROGRAM: A program to show simple inheritance. /** * @Prof. Jayesh * Here two classes are created each having main function * … Read more
PROGRAM: Program to show use of array. /** * @Prof. Jayesh * Here an array variable a[], is printing its elements using for … Read more
PROGRAM: To show use of Arithmetic operators. /** * @Prof. Jayesh * Here use of arithmetic operators are shown. * Arithmetic operators … Read more
PROGRAM: Simple program to show use of scanner class. import java.util.Scanner; public class AddScanner { public static void main(String args[]) { int x,y,z; System.out.println(“Enter 2 … Read more