What is return used for in java?
No Answer is Posted For this Question
Be the First to Post Answer
Can constructor be static or final?
What is ternary operator? Give an example.
How are this() and super() used with constructors in java programming?
Is there any sort function in java?
What is the type of lambda expression?
What does the “static” keyword mean?
Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
What is the numeric promotion?
What is a null check?
How do you sort arraylist in descending order?
What about anonymous inner classes in java?
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()); } }