Explain the scope or life time of class variables or static variables?
No Answer is Posted For this Question
Be the First to Post Answer
What is ternary operator? Give an example.
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
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
Give a practical example of singleton class usage?
What are different types of constants?
What are the different access modifiers available in java?
I/O blocking means?
Name few java.lang classes introduced with java 8 ?
What are packages and name a few?
Can we add default constructor to Servlet?
What is a variable declaration?
What happens when a thread cannot acquire a lock on an object in java programming?