Write a program in java to demonstrate valueOf() method?

class WrapperValueOf {                 public static void main(String arg[])                 {                                 //Converting int into Integer                                 int a=20;                                …

Read More

Write a program in java to demonstrate instanceof operator?

class InstanceOf {                 public static void main(String arg[])                 {                                 InstanceOf x=new InstanceOf();                                 System.out.println(x instanceof InstanceOf);                                …

Read More

Write a program in java to demonstrate reverse() and replace() method?

class StringReverseReplace {                 public static void main(String arg[])                 {                                 StringBuffer s1=new StringBuffer(“Vikrant “);                                 StringBuffer s2=s1.append(“Kumar”);                                …

Read More