OOP Flashcards
initiated the Java language project in June 1991
James Gosling, Mike Sheridan, and Patrick Naughton
Java two types of programs
applications and applets
Data types
Integer (Numbers)
String (Words, Letters)
Float (Decimals (6-7))
Character (Specific Character)
Double (Decimals (15))
Boolean (True or False)
helpful to take aclassor all classes visible for a program specified under apackage, with the help of a single statement
Importstatement
By using this, we can access data members or member functions of a class directly without the use of a fully-qualified name.
static import statements
tells the compiler the path of a class or the entire package.
import statement
This method tells the compiler that the class is defined under a particular package, and we want to use that class or classes in our program.
Fully-qualified Name
a block of code that, when called, performs specific actions mentioned in it.
method
It is used to define the access type of the method.
Access Specifier
Public: You can access it from any class
Private: You can access it within the class where it is defined
Protected: Accessible only in the same package or other subclasses in another package
specifier used by the Java compiler if we don’t mention any other specifiers. It is accessible only from the package where it is declared
Default
It is used to give a unique name to the method.
Method name
It is a list of arguments (data type and variable name) that will be used in the method.
Parameter list
This is the set of instructions enclosed within curly brackets that the method will perform.
Method body