Java Full Stack Intern – Interview Q&A;
Q1. JDK vs JRE vs JVM
JDK → Development kit (compiler, debugger, tools).
JRE → Runtime environment (libraries + JVM).
JVM → Virtual machine that executes bytecode.
Q2. OOP Concepts in Java
Encapsulation → Hiding data (private variables + getters/setters).
Inheritance → Reusing code (child inherits parent).
Polymorphism → Same method, different behavior (overloading/overriding).
Abstraction → Hiding implementation, showing only essentials (abstract class/interface).
Q3. Interface vs Abstract Class
Interface → 100% abstraction (till Java 8), multiple inheritance, only method signatures.
Abstract class → Can have abstract + concrete methods, single inheritance.
Q4. Constructor in Java
Special method to initialize objects.
Types → Default (no args), Parameterized.
Q5. Overloading vs Overriding
Overloading → Same method name, diff parameters (compile-time).
Overriding → Subclass changes parent method (runtime).
Q6. Exception Handling Keywords
try: risky code
catch: handles exception
finally: always runs
throw: used to throw exception manually
throws: declares exceptions
Q7. Array vs ArrayList
Array: fixed size, primitives/objects.
ArrayList: dynamic size, objects only.
Q8. HashMap Working
Stores key-value pairs.
Uses hashing internally.
Keys unique, values can duplicate.
Q9. == vs .equals()
== → compares memory reference.
.equals() → compares values.
Q10. Simple Java Programs
Palindrome check, Fibonacci, Factorial, Reverse string.
Q11. JDBC
Java API for database connection.
Steps: Load driver → Connect → Execute query → Close connection.
Q12. SQL Queries
SELECT: SELECT * FROM students;
INSERT: INSERT INTO students VALUES (1,'Mayur','CSE');
UPDATE: UPDATE students SET name='Rahul' WHERE id=1;
DELETE: DELETE FROM students WHERE id=1;
Q13. Primary vs Foreign Key
Primary Key → Unique identifier in a table.
Foreign Key → Refers to primary key in another table.
Q14. Joins
INNER JOIN: only matching rows.
LEFT JOIN: all from left, matching from right.
RIGHT JOIN: all from right, matching from left.
Q15. Servlet vs JSP
Servlet → Java class, request/response handling.
JSP → Easier, HTML + Java embedded.
Q16. REST API Basics
REST = Representational State Transfer.
HTTP methods → GET, POST, PUT, DELETE.
Q17. div vs span
div = block-level, full width.
span = inline, inside text.
Q18. CSS Types
Inline, Internal, External.
Q19. JavaScript Basics
var = function scope
let = block scope
const = constant
DOM = HTML tree model.
Q20. == vs === in JS
== → checks value only.
=== → checks value + type.
Q21. Arrow Functions
let add = (a,b) => a+b;
Q22. Tell me about yourself.
Answer: I’m Mayur Mahajan, pursuing [your degree/year]. I have skills in Java, SQL, HTML, CSS,
and JavaScript. I’ve done [STCL project]. I want to grow as a full stack developer.
Q23. Why Java Full Stack Internship?
Answer: Because it covers both frontend and backend. I want to learn end-to-end development and
apply coding skills to real projects.
Q24. College Project (STCL)
Answer: Explain in 2–3 lines: problem → solution → tech used.
Q25. How do you learn new tech?
Answer: Through online tutorials, documentation, and by practicing small projects.
Q26. Comfortable in hybrid/virtual?
Answer: Yes, I am flexible with both modes.