Class A{Public void meth(){}}class B extends A{ Public void meth(){ } public static void main(String args[]){ A a=new A(); a.meth();//which method will this call } }if u want to call a method of class B then how can u achieve this?
What is the difference between RequestDispatcher.forward(request req,response res) And response.sencRedirect("url");?
Latest Answer : String object value are constant. StringBuffer object values can be modified and they can be growable. In StringBuffer, values can be inserted anywhere(even in the middle), but it is not possible with String. ...
How to increment the capacity of a StringBuffer? If String S="x"; S+"y"; Then what is S?
Latest Answer : Yes, Final will exectue even we use return in try ...
Latest Answer : The signature of the main method should be public static void main (String argv[])Iin your question the argument passed to main() is String object, it should always be an String array. ...
Latest Answer : It is a String literal. ...
Public class A {int x; public static void main(String args[]) {x=x+1;s.o.p(x);}}what is the output? a) compile time errorb) runtime error