Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Core Java Interview Questions
Questions Answers Views Company eMail

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 2288

what are the uses of Class class and what it returns? explain it with the example code.

1 2656

class test { private static void main(String []adsf) { } } explain me that the above code is error or exception

3 3464

class a extends b { } class b extends a { } why java doesn't support cyclic pls explain me with example

Wipro,

3 7777

how to create a jar file in java

1 3565

what is the main difference between string and stringbuffer? can you explain it with program?

2 3523

How can i add a button in applet in java ???

2 2784

did interface can implementation method ? i know its not possible but my interviewer said its possible ..but how..? any one have idea ???

IBM,

7 7568

how to make the double-tone class ? as we have singletone class..?

IBM, Microsoft,

1 3591

why constructor dont have returns type?

IBM,

9 9627

is JVM platform dependent or independent..?

IBM, Tech Mahindra,

11 34851

what is difference between interface and abstract class..?

4 4409

How to make a method thread safe without using synchronized keyword?

Persistent, Societe Generale,

8 28725

what is the collable collections in java?

Persistent,

2 10389

we 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.

1139


Post New Core Java Questions






Un-Answered Questions { Core Java }

What is navigable map in java?

170


What is an eror in java?

198


When do you call copy constructor?

219


Can we nested try statements in java?

238


Which package has light weight components in java programming?

231






How do you achieve polymorphism in java?

192


What is mean by encoding?

190


What’s the difference between unit, integration and functional testing?

265


Explain thread in java?

233


What are thread local variables?

209


Why do we use predicate in java?

184


What is integer parseint?

198


Wha is the output from system.out.println(“hello”+null); ?

272


What is the maximum size of a string in java?

190


What is final modifier?

208