Java program use of String
public class StringConstructor { public static void main (String args[]){ char arr[ ] = { ‘x’, ‘y’, ‘z’}; String st = new … Read more
public class StringConstructor { public static void main (String args[]){ char arr[ ] = { ‘x’, ‘y’, ‘z’}; String st = new … Read more
PROGRAM: To show method overloading . /** * @Prof. Jayesh * Here method overloading is shown, differed in parameters. */ class ContainsMethods … 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