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
1 2876class test { private static void main(String []adsf) { } } explain me that the above code is error or exception
3 4291class a extends b { } class b extends a { } why java doesn't support cyclic pls explain me with example
3 8771what is the main difference between string and stringbuffer? can you explain it with program?
2 4305did interface can implementation method ? i know its not possible but my interviewer said its possible ..but how..? any one have idea ???
IBM,
7 9121we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.
1560
What is comparator in java?
What is the use of join method?
Program to Find the second largest element in an array.
How does system arraycopy work in java?
What is a numeric literal?
what is a thread pool in java and why is it used?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
What is an array length?
How does split work in java?
Does a class inherit the constructors of its superclass in java programming?
How can a gui component handle its own events?
What is arraylist e?
What is anti pattern in cyber security?
How do you check if two given string are anagrams?
What is the largest data type in java?