Flashcards on Java

Click on the flashcard to see the answer


What is Java Virtual Machine (JVM)?

It's a virtual machine that provides a runtime environment to execute Java bytecode.

What is the difference between JDK and JRE in Java?

JDK stands for Java Development Kit, which includes JRE plus development tools, whereas JRE stands for Java Runtime Environment, which includes libraries, Java Virtual Machine (JVM), and other components to run Java applications.

What is Object-Oriented Programming in Java?

It's a programming paradigm that uses the concept of objects to represent data and behavior. Java is an object-oriented programming language.

What is static in Java?

It's a keyword that can be used to create variables, methods, or blocks with static scope, which means they belong to the class instead of an instance of the class.

What is encapsulation in Java?

It's a mechanism of wrapping data and methods into a single unit, which is called a class. It helps to protect the data from unauthorized access.

What is a constructor in Java?

It's a special method that is used to initialize objects. It has the same name as the class and no return type.

What is the difference between an abstract class and an interface in Java?

An abstract class can have both abstract and non-abstract methods, whereas an interface can only have abstract methods. A class can extend only one abstract class, but it can implement multiple interfaces.

What is exception handling in Java?

It's a mechanism of handling runtime errors or exceptional circumstances in a program. It helps to maintain the normal flow of the program and avoid unexpected termination.

What is a package in Java?

It's a way of organizing related classes and interfaces into a single unit, which helps to avoid naming conflicts and improve code maintenance.

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

== is used to compare the references of objects, whereas equals() is used to compare the contents or values of objects.

What is the main() method in Java?

It's a special method that is the entry point of a Java program. It's called by the JVM when the program starts and has the following signature: public static void main(String[] args).

What is a thread in Java?

It's a lightweight unit of execution that runs concurrently with other threads in a program. It helps to improve the performance and responsiveness of a program.

What are the types of loops in Java?

There are three types of loops in Java: for, while, and do-while.

What is the difference between an int and Integer in Java?

int is a primitive data type that stores a value, whereas Integer is a wrapper class that provides methods to operate on int values.

What is Java Reflection API?

It's a set of classes and interfaces that allow Java programs to inspect and modify the behavior of Java classes and objects at runtime.

What is Java Virtual Machine (JVM)?

It's a virtual machine that provides a runtime environment to execute Java bytecode.

What is the difference between JDK and JRE in Java?

JDK stands for Java Development Kit, which includes JRE plus development tools, whereas JRE stands for Java Runtime Environment, which includes libraries, Java Virtual Machine (JVM), and other components to run Java applications.

What is Object-Oriented Programming in Java?

It's a programming paradigm that uses the concept of objects to represent data and behavior. Java is an object-oriented programming language.

What is static in Java?

It's a keyword that can be used to create variables, methods, or blocks with static scope, which means they belong to the class instead of an instance of the class.

What is encapsulation in Java?

It's a mechanism of wrapping data and methods into a single unit, which is called a class. It helps to protect the data from unauthorized access.

What is a constructor in Java?

It's a special method that is used to initialize objects. It has the same name as the class and no return type.

What is the difference between an abstract class and an interface in Java?

An abstract class can have both abstract and non-abstract methods, whereas an interface can only have abstract methods. A class can extend only one abstract class, but it can implement multiple interfaces.

What is exception handling in Java?

It's a mechanism of handling runtime errors or exceptional circumstances in a program. It helps to maintain the normal flow of the program and avoid unexpected termination.

What is a package in Java?

It's a way of organizing related classes and interfaces into a single unit, which helps to avoid naming conflicts and improve code maintenance.

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

== is used to compare the references of objects, whereas equals() is used to compare the contents or values of objects.

What is the main() method in Java?

It's a special method that is the entry point of a Java program. It's called by the JVM when the program starts and has the following signature: public static void main(String[] args).

What is a thread in Java?

It's a lightweight unit of execution that runs concurrently with other threads in a program. It helps to improve the performance and responsiveness of a program.

What are the types of loops in Java?

There are three types of loops in Java: for, while, and do-while.

What is the difference between an int and Integer in Java?

int is a primitive data type that stores a value, whereas Integer is a wrapper class that provides methods to operate on int values.

What is Java Reflection API?

It's a set of classes and interfaces that allow Java programs to inspect and modify the behavior of Java classes and objects at runtime.

Share


Login to Save


Share



Login to Save


Explore Other Decks


Made for Grade 8

Low Level Languages, High Level Languages and Translation Programs


View Deck
Made for Grade 8

Maria Manoru 'Charlotte Obtaining... 13 Points'


View Deck
Made for Grade 3

Meghan Mac Donald 'Judy Moody meets a new teacher'


View Deck

Explore More