Why scanner is used in java?
No Answer is Posted For this Question
Be the First to Post Answer
What is an error in java?
What is the importance of static variable?
What are the 4 versions of java?
hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class
Explain the features of interfaces in java?
Can we use string in the switch case?
What is difference between classpath and path variables in java?
Why are generics used?
What is set string?
What is the use of Getters and Setters method ?
public class BatchTest { public static void main(String[] args) { Runtime run = Runtime.getRuntime(); try { Process p = run.exec("cmd start /c D:/test.bat"); System.out.println(p.exitValue()); } catch (Exception e) { e.printStackTrace(); } System.out.println("FINISHED"); } }
Can a private method of a superclass be declared within a subclass?