Nice Interview questions

Duration: 1hr 15 min
  1. Explain Encapsulation and abstraction
  2. How can you achieve abstraction
  3. What is constructor in Java?explain the types of constructor
  4. Can we make Constructor as private?
  5. What is singleton class? Write java code for it
  6. What is static block?
  7. Explain JDK, JRE and JVM in detail
  8. What is class loader?
  9. Explain polymorphism 
  10. What is method hiding? how can you achieve it
  11. What is interface? where you use it
  12. Explain different type of access specifiers in java
  13. Write Program to print Fibonacci series
  14. Write program to find maximum element in an array
  15. Write SQl query to find 5th maximum marks from student table
  16. WHat is deep shadow and copy shadow  in java. Explain it with a writing program.
  17. How you inject dependency in springboot
  18. How Can you change JAVA version 
  19. Where you add configuration setting in spring boot project
  20. Explain pom.xml file. and what it contains
  21. What is association
  22. Explain Java 8 features
  23. What is stream API? how you use it
  24. Explain solid principles
  25. Expain Multithreading how you write code for threads
  26. Any idea about build tools?
  27. Difference between hasmap and hashtable
  28. difference between linkedlist and arraylist? which is fast?
  29. What is association
  30. What is SpringBootApplication Annotation?  Can we write it more than one time in an application
  31. What is stringBuilder and stringBuffer explain it
  32. What do you understand by string pool
  33. How have you done unit testing? 
  34. Difference between Soap and Rest API
  35. What are Designing pattern
  36. How do you pass parameters in rest apis
  37. What is requestMapping and getMapping
  38. Explain @ComponentScan
  39. Explain exception handling
  40. Can you write try block without using catch?
  41. How can you prioritize multiple catch blocks
  42. What is hibernate
  43. Have you previously used Kafka?
  44. What is failed fast?
  45. what is actuators and end point?
  46. Differnce between == operator and equal method
  47. Which kind of Complex SQL query have your written

Wissen technology
 Which Java version have you used?
  explain java8 and java11 new features
  what is functional interface
   what is stream API
what is Mutable and immutable classes?
  How hashset and hashmap internally work
  Consider the following program to insert values into HashSet.  

class Student { 

    public int id; 

    public String name; 

  

    public Student(String name, int id) { 

        this.name = name;  

        this.id = id; 

    } 

  

    public int hashCode() { 

        return this.id; 

    } 

  

    public String toString() { 

        return "Student: " + this.name + "@" + Integer.toHexString(hashCode()); 

    } 

  

    public boolean equals(Object o) { 

        if (o instanceof Student) { 

           Student s = (Student) o; 

           return s.id == this.id ? true : false; 

        } 

        return false; 

    } 

} 

  

public class UpdateHashSet { 

  

    public static void main(String[] args) { 

    HashSet<Student> studentList = new HashSet<>(); 

  

    Student st1 = new Student("Nimit", 1); 

    Student st2 = new Student("Rahul", 3); 

    Student st3 = new Student("Nimit", 2); 

    studentList.add(st1); 

    studentList.add(st2); 

    studentList.add(st3); 

  

    System.out.println(studentList.size()); //3 

  

    st1.id = 3; 

    System.out.println(studentList.size()); //2 

   } 

} 

  

What will be the output? 

 

 

Q2 

Table Name : Student 

  

Column : Name, Subject, Marks 

  

Rama Math 50 

Rama Physics 60 

Rama English 45 

Hari Math 70 

Hari Physics 65 

Hari English 85 

Gita Math 90 

Gita Physics 55 

Gita English 80 

  

Expected Output:  

Gita 225 

Hari 220 

Rama  155 

  

Print the Students In Notice board format. 

(i.e Calculate the Toal mark for an individual student, 

and print in descending order of total marks.) 



Write java program to remove duplicates from an array and assign null or 0 in the end

https://www.onlinegdb.com/fork/b8BWV6xPT

Comments

Popular posts from this blog

Intellect Interview Experience

Google

Accolite digital Interview experience