0% found this document useful (0 votes)
47 views3 pages

PR Java

Uploaded by

island.workp1
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)
47 views3 pages

PR Java

Uploaded by

island.workp1
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/ 3

[Link] is java?

Java is a high-level, object-oriented programming language used for building applications


that run on multiple platforms. It is known for its portability, scalability, and robustness.

[Link] are the main features of java?

The main features of Java are: platform-independent, object-oriented, secure, robust,


multithreaded, high-performance, and dynamic.

3. Explain the difference between JDK, JRE, and JVM.

JDK: Java Development Kit, includes tools for developing Java programs (e.g., compiler).

JRE: Java Runtime Environment, contains JVM and libraries to run Java programs.

JVM: Java Virtual Machine, executes Java bytecode on any platform.

4. What are the access modifiers in Java?

Access modifiers in Java are keywords that define the visibility or accessibility of classes,
methods, and variables.

Public: Accessible everywhere.

Private: Accessible only within the class.

Protected: Accessible within the package and subclasses.

Default: Accessible within the package.

[Link] are principles of oops?

Encapsulation, inheritance, ,polymorphism,abstraction.

[Link] is inheritance? Types

[Link] is polymorphism types ?

[Link] is encapsulation?

[Link] is abstraction?

[Link] is interface?

[Link] is constructor? Types.

A constructor is a special method used to initialize objects.


Default Constructor: No parameters.

Parameterized Constructor: Takes parameters to initialize fields.

[Link] is this and super keyword in java ?

This: Refers to the current object of the class. It is used to access instance variables,
methods, or constructors.

Super: Refers to the parent class object. It is used to access parent class methods,
variables, or constructors.

[Link] keyword?

The final keyword in Java makes things constant or unchangeable:

1. Final variable: Value cannot be changed.


2. Final method: Cannot be overridden.
3. Final class: Cannot be extended.

[Link] keyword?

The static keyword in Java is used for variables and methods that are shared by all
instances of a class. You can access them without creating an object of the class.

[Link] is main method?

The main method is the entry point for Java programs.

[Link] is package?

[Link] is exception?

18. What is exception handling?

[Link] is try, catch, finally?

[Link] is throw?

[Link] is throws?

[Link] is multi threading?


Running multiple threads (lightweight processes) concurrently to achieve parallelism.

[Link] is thread?

[Link] is thread synchronization?

Synchronization prevents thread interference by allowing only one thread to access a


critical section at a time.

You might also like