-
-
-
-
}
}
public class B{
public static void main(String args[])
{
A a=new A();
System.out.println(a.meth1());
}
}
The above code gives a compile error.It says cannot use void.If the return type is not void then it compiles sucessfully
what could be the reason?">Class A{public static void meth1(){System.out.println("Inside method 1");}}public class B{public static void main(String args[]){A a=new A();System.out.println(a.meth1());}}The above code gives a compile error.It says cannot use void.If the return type is not void then it compiles sucessfullywhat could be the reason?
-
-
-
-
Creating database tables during the application run time
hi,I'm doing a project using jsp, java script, HTML as front end and sql server as backend.i want to create my database inn runtime. while doing so ,1. how do i check for an already existing class2. if there is an already existing class then i need to update the table .how do i do this. can any one guide through this.vidhya
-
}
}">What is the meaning of final keyword in java? I know that it is used to declare constant values which are not modifiable. But in the below program even I declare the vector as final, then still I am able to modify it? Can any body explain what is the scenario here?import java.util.*;public class A{ public static void main(String args[]) { final Vector v=new Vector(); v.addElement("element1"): }}
-
-
-
-
-
-
-
-
-
-
-
Java Interview Questions
Ans