- Here some of the java programming interview questions and answers for experienced on different topics.
- Java interview programs and answers for experienced.
- Java Coding interview Questions
- Java tricky interview programs to practice.
Program #1: what will happen if we try to print null using system.out.println
- package interviewprograms.instanceofjava;
- public class InterviewProgram {
- /**
- * @java programming interview questions and answers for freshers and experienced
- */
- public static void main(String[] args) {
- System.out.println(null);
- }
- }
Program #2: Java Interview program :Can we create object for abstract class in same class
- package interviewprograms.instanceofjava;
- public abstract class AbstractDemo {
- public static void main(String args[]){
- AbstractDemo obj = new AbstractDemo();
- }
- }
Program #3: Java Interview program : what will be the output of below java program
Program #4: Guess the order of execution of constructors
- package interviewprograms.instanceofjava;
- public class ConstructorDemo {
- ConstructorDemo(){
- this(1);
- System.out.println("Zero argument constructor");
- }
- ConstructorDemo(int a){
- this("Hi",1);
- System.out.println("One argument constructor");
- }
- ConstructorDemo(String str, int x){
- System.out.println("Two argument constructor");
- }
- public static void main(String[] args) {
- ConstructorDemo obj =new ConstructorDemo();
- }
- }
Best book I have found on Java coding interview questions is "TOP 30 Java Interview Coding Tasks" by Matthew Urban. Very concise and well explained, most common interview questions.
ReplyDelete