Open In App

Deloitte Interview Experience for Full Stack Java developer

Last Updated : 10 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Ist round of an interview at Deloitte.

Introduction about yourself, education background, IT experience, worked on technologies and Projects.

  • Why so frequent changes as the current change was 6 months back?
  • What is System.out.println()?
  • What is the difference between Abstract class, and Interface? Can we create a constructor of both?
  • Can we have different written types in method overloading and overriding?

Various scenario-based code snippets provided:

class A{

access_specifier void method(){…some code}

}

class B extends A{

access_specifier void method(){…some code}

}

  • Can we have a different access_specifier or a different return type in the above code?

class A{

access_specifier void method() throws IOException {…some code}

}

class B extends A{

access_specifier void method() throws Exception{…some code}

}

  • Can we write like this?
  • What if we will put static in above code in both methods of class A and B?
  • In above code what will be the consequences of below statements?

A a1= new B(); B a2 = new A(); A a3 = new A(); B a4 =new B();

class A{

try{

//… some code

return 3;

}

catch(Throwable e){

return 5;

}

finally{

return 7;

}

return 9;

}

  • Will this code compile? What will be output of the above code? what will the output if we will remove unreachable code?
  • What are classes under Throwable?
  • Is Throwable is right to write in catch?

class A{

A(){

s.o.p(“A”)

}

}

class B{

B(){

s.o.p(“B”)

}

}

class C{

C(){

s.o.p(“C”)

}

}

  • What will be output of above code? why JVM add super() in constructor?

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads