0% found this document useful (0 votes)
2 views7 pages

Java, Python,SQL

The document provides a comprehensive interview preparation guide covering Java, Python, and SQL with easy explanations for 20 key questions in each language. It includes fundamental concepts such as OOP principles in Java, data types and functions in Python, and database operations in SQL. Each section outlines essential definitions and differences to help candidates prepare for technical interviews.

Uploaded by

dhirajbhul594
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

Java, Python,SQL

The document provides a comprehensive interview preparation guide covering Java, Python, and SQL with easy explanations for 20 key questions in each language. It includes fundamental concepts such as OOP principles in Java, data types and functions in Python, and database operations in SQL. Each section outlines essential definitions and differences to help candidates prepare for technical interviews.

Uploaded by

dhirajbhul594
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Interview Preparation - Java, Python, SQL (Easy Format)

Java

Java - Easy Explanation (20 Questions)

1. What is Java?

Java is a computer language used to make software and apps. It's used everywhere like Android apps,

websites, and more.

2. What is JVM?

JVM is like a machine inside your computer that runs Java code.

3. What is JDK and JRE?

- JDK is used to write Java programs.

- JRE is used to run Java programs.

4. What is OOPs?

OOPs means writing code using objects. It includes: Inheritance, Polymorphism, Encapsulation, Abstraction.

5. What is a class and object?

- A class is like a plan or blueprint.

- An object is the real thing made from that plan.

6. What is a constructor?

A special method that runs when you create an object. It sets the values.

7. What is method overloading?

Same method name but with different inputs.

8. What is method overriding?

When a child class changes a method from the parent class.


Interview Preparation - Java, Python, SQL (Easy Format)

9. What is inheritance?

One class gets features from another class.

10. What is abstraction?

It hides the details, only shows what is needed.

11. What is encapsulation?

It protects the data by keeping it inside the class.

12. What is polymorphism?

One thing behaves in different ways, like a method doing different tasks.

13. Difference between == and .equals()?

- == checks if two things are the same box (memory).

- .equals() checks if two things have same value.

14. What are access modifiers?

They decide who can use your variables or methods: public, private, protected.

15. What are static variables/methods?

They belong to the class, not the object.

16. What is final keyword?

Used when you want to stop changes to a variable or method.

17. What is exception handling?

Fixing errors when your code runs, using try-catch.

18. Checked vs Unchecked exceptions?

- Checked: Errors checked during compiling.

- Unchecked: Errors found while running.


Interview Preparation - Java, Python, SQL (Easy Format)

19. What is an interface?

A set of rules (methods) that a class must follow.

20. Difference between array and ArrayList?

- Array: fixed size

- ArrayList: size can grow

Python

Python - Easy Explanation (20 Questions)

1. What is Python?

A simple language used to write apps, websites, games, etc.

2. What are Python data types?

Types of values you can store, like: int, float, str, list, tuple, dict, etc.

3. List vs Tuple?

- List: You can change values.

- Tuple: You cannot change values.

4. What is a dictionary?

Stores data in key-value format. Example: {"name": "Dhiraj"}

5. What is a function?

A block of code that does something. We create it using def.

6. What is indentation?

Python uses spaces to define blocks (no {} like Java).

7. What are loops?


Interview Preparation - Java, Python, SQL (Easy Format)

Used to repeat something. Types: for, while.

8. What is break and continue?

- break: Stops the loop.

- continue: Skips current step and goes to next.

9. What is a module and package?

- Module: one Python file

- Package: many modules

10. What is lambda function?

A small one-line function without a name.

11. What is self?

Used in classes to refer to the current object.

12. Difference between is and ==?

- is: checks if both are same object

- ==: checks if values are same

13. What is list comprehension?

Short way to make a list: [x for x in range(5)]

14. What are *args and **kwargs?

Let you pass many values to a function.

15. What is inheritance?

One class gets things from another class.

16. Difference between del, remove(), pop()?

- del: Deletes by index

- remove(): Deletes by value


Interview Preparation - Java, Python, SQL (Easy Format)

- pop(): Deletes by index and returns value

17. What are decorators?

They change how a function works.

18. What is with used for?

Used in file handling to auto-close the file.

19. What is exception handling?

Catching and managing errors using try-except.

20. What is type casting?

Changing one type into another, like int("5").

SQL

SQL - Easy Explanation (20 Questions)

1. What is SQL?

A language to work with databases.

2. What is a primary key?

A column that uniquely identifies every row.

3. What is a foreign key?

Connects one table to another using keys.

4. What is DDL?

Commands that change table structure: CREATE, ALTER, DROP

5. What is DML?
Interview Preparation - Java, Python, SQL (Easy Format)

Commands to change data: SELECT, INSERT, UPDATE, DELETE

6. What is a join?

Used to combine rows from different tables.

7. Types of joins?

- INNER

- LEFT

- RIGHT

- FULL

8. What is a subquery?

A query inside another query.

9. What is normalization?

Breaking data into small clean tables to avoid repetition.

10. What is denormalization?

Putting extra data in one table for speed.

11. WHERE vs HAVING?

- WHERE: filters before grouping

- HAVING: filters after grouping

12. UNION vs UNION ALL?

- UNION: removes duplicates

- UNION ALL: keeps all data

13. What is a view?

A virtual table created using a SELECT query.

14. What is an index?


Interview Preparation - Java, Python, SQL (Easy Format)

Helps in faster searching of data.

15. What is a stored procedure?

Saved SQL code that can be reused.

16. What is a trigger?

Runs automatically when something changes in a table.

17. What is GROUP BY?

Used to group rows with the same values.

18. What is ORDER BY?

Used to sort results.

19. What is NULL?

Means no value.

20. Find second highest salary:

SELECT MAX(salary) FROM employees

WHERE salary < (SELECT MAX(salary) FROM employees);

You might also like