What are the restriction imposed on a static method or a static block of code?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What will be the output of the program? public class Test { public static void main(String args[]) { ArrayList<String> list = new ArrayList<String>(); list.add("2"); list.add("3"); list.add("4"); list.add("5"); System.out.println("size :"+list.size()); for(int i=0;i<list.size();i++) { list.remove(i); } System.out.println("size after:"+list.size()); } }

5 Answers   Rolta,


How do you compare two strings lexicographically?

0 Answers  


Explain about static imports in java?

0 Answers  


What are the ways to instantiate the class class?

0 Answers  


What is the maximum size of hashmap in java?

0 Answers  


what is the difference between Cpp And Java

15 Answers   Infosys,


what is private constructor?what are the uses of writing private constructor in our program?

10 Answers  


Why would you desing a J2EE application so user data is entered by way of a JSP page and managed by an underlying Java Beans class?

5 Answers   Adobe,


what is a transient variable?

5 Answers  


What is the difference between @before and @beforeclass annotation?

0 Answers  


How do you sort arrays in java?

0 Answers  


What is the return type of the main method?

0 Answers  


Categories