Core Java Interview Questions (Basic Level)1. What is Java?Java is a high-level, object-oriented, platform-independent programming language

Core Java Interview Questions (Basic Level)

1. What is Java?

Java is a high-level, object-oriented, platform-independent programming language developed by Sun

Microsystems.

2. What are the features of Java?

 Object-Oriented

 Platform Independent (via JVM)

 Secure and Robust

 Multithreaded

 Architecture Neutral

 High Performance (via JIT compiler)

3. What is the difference between JDK, JRE, and JVM?

 JDK: Java Development Kit – tools to develop and compile Java code.

 JRE: Java Runtime Environment – environment to run Java applications.

 JVM: Java Virtual Machine – executes bytecode on different machines.

4. What are data types in Java?

 Primitive: int, byte, short, long, float, double, char, boolean

 Non-Primitive: Arrays, Classes, Interfaces, Strings

5. What is the difference between == and .equals() in Java?

 == compares object references.

 .equals() compares actual values of objects.

6. What is a constructor in Java?

A constructor is a special method used to initialize objects. It has the same name as the class and no

return type.

7. What is the difference between method overloading and overriding?

 Overloading: Same method name, different parameters (within same class).

 Overriding: Same method name and parameters (in child class).

8. What are access modifiers in Java?

 public: Accessible from everywhere.

 private: Accessible only within the class.

 protected: Accessible within package and subclasses.

 default (no modifier): Accessible within package only.

9. What is the difference between ArrayList and LinkedList?

 ArrayList: Faster for read operations, uses index.

 LinkedList: Faster for insert/delete operations.

10. What is an interface in Java?

An interface is a reference type that contains only abstract methods (before Java 8). Used for

abstraction and multiple inheritance.

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Follow the attach instructions to complete this work.How does FedRAMP help agencies ensure that Digital Government services are secure?   Must

Follow the attach instructions to complete this work. How does FedRAMP help agencies ensure that Digital Government services are secure?   Must post first. Subscribe The format for your week 3 discussion is a backgrounder (“briefing paper”). Background papers are summaries of issues provided to help decision-makers/leaders/managers make decisions. Decision-makers

Follow the attach document to complete this work.International Cooperation for Cybersecurity  Prepare a 5- to 7-paragraph briefing statement

Follow the attach document to complete this work. International Cooperation for Cybersecurity   Prepare a 5- to 7-paragraph briefing statement that explains why wealthy nations and developing nations should work together to improve cybersecurity for the globally connected networks referred to as “the Internet.” Your statement should address the following.

Project 4: Postmigration Activities  Step 1: Postmigration Activities Overview  Like any software development project, migration projects require

Project 4: Postmigration Activities  Step 1: Postmigration Activities Overview  Like any software development project, migration projects require careful planning to ensure success. This planning includes the postmigration testing and maintenance phase. Start this project by researching and planning the  postmigration activities that will be required to get BallotOnline’s migrated workloads in