Java Basics Practice Test: Classes and Methods — Flashcards | Java Programming | FatSkills

Java Basics Practice Test: Classes and Methods — Flashcards

Fast review mode: answers are shown by default so you can skim quickly. Hide them if you want to self-test.

Java Quiz on fundamentals of classes, methods basics, heap and garbage collection, object creation, constructors, access control, string class, method overloading and static keyword, command line arguments and recursion.

Java Classes
Static Class:
A static class is a class that contains only static methods and variables. Static classes cannot be instantiated, and they are often used to create utility classes.
Final Class: A final class is a class that cannot be extended. Final classes are often used to create classes that represent immutable data, such as the String class.
Abstract Class: An abstract class is a class that cannot be instantiated, but it can be extended. Abstract classes are often used to create base classes for other classes.
Concrete Class: A concrete class is a class that can be instantiated. Concrete classes are the most common type of class.
Singleton Class: A singleton class is a class that can only have one instance. Singleton classes are often used to create classes that represent resources, such as a database connection pool.
POJO Class: A POJO (Plain Old Java Object) class is a class that has no special functionality. POJO classes are often used to create data transfer objects (DTOs).
Inner Class: An inner class is a class that is declared inside another class. Inner classes can access the private members of the outer class.

Java Methods
Instance Method:
An instance method is a method that is called on an object. Instance methods can access the private members of the object.
Static Method: A static method is a method that is called on a class. Static methods cannot access the private members of an object.
Abstract Method: An abstract method is a method that does not have an implementation. Abstract methods must be implemented by subclasses of the class that declares them.
Concrete Method: A concrete method is a method that has an implementation. Concrete methods are the most common type of method.
Final Method: A final method is a method that cannot be overridden by subclasses. Final methods are often used to prevent subclasses from changing the behavior of a method.
Native Method: A native method is a method that is implemented in a language other than Java. Native methods are often used to call code that is written in C or C++.

1 of 139 Ready
What is the stored in the object obj in following lines of Java code?
box obj;
NULL
Shortcuts
Prev Space Show / hide Next
Turn this into a study set.
Sign in with Google to save tricky questions to your reminder list and resume on any device.
Sign in with Google Free • no extra password