Please briefly define the following concepts, keywords, and terms, as they perta
ID: 3813588 • Letter: P
Question
Please briefly define the following concepts, keywords, and terms, as they pertain to the Java language use examples where appropriate
Java Runtime Environment (JRE)
null pointer assignment
object
private
privilege
public
scope
subclass
subtype
superclass
void
while
abstract class
array index out of bounds
boolean
break
class
class method
constructor
do
else
inheritance
Java Development Kit (JDK)
Java Runtime Environment (JRE)
null pointer assignment
object
private
privilege
public
scope
subclass
subtype
superclass
void
while
Explanation / Answer
abstract:-
abstract is a java keyword used for defining an abstract class or abstract methods in java.
abstract class:-
an abstract class is a java class that defined with abstract keyword it may contain a non-abstract or abstract methods. it is used to hiding the implementations it only contains declarations needs to be extended.
example;-
abstract class Abc { }
class Def extends Abc { }
array index out of bounds:-
it is an java exception caused by trying to accessing an array elements that are out of the range of an array.
example:-
int a=new int[10];
System.out.print(a[100]);
boolean:-
it is a data type in java it has only one value values either true or false
break:-
it is a java keyword that stops an execution of loop to control the execution flow and data flow either conditionally or unconditionally.
class:-
a class in a java is collection of objects and methods that are implements particular tasks
class method:-
it is a method in a class that are implements for to do particular tasks.
constructor:-
a constructor is a class method that has same name as class name it execute by default after creating an object without calling it.
do:-
it is a used with a combination of while it is a control statement in java do-while
syntax:-
do{
------
-------
}while(condition);
else:-
it is a used with a combination of if, it is a conditional statement in java if-else
syntax:-if(condition){
---------}
else{
--------}
inheritance:-
it is an object orientation property in java it inherits the properties of one class to another class using extends keywords.
java development kit (JDK):-
it has set of libraries used for developing the code for applications with the combination of JRE & development tools.
java runtime environment (JRE):-
it has set of libraries and other data for running a java application with the combination of java virtual machine (JVM), basically it provides run time environment
null pointer assignment:-
it is a run time exception caused by trying to access illegal memory location
object:-
an object is an instance of a class for access the class members and class variables.
example:-
classAbc{
int a;
}
classCde{
objectobj=new Abc();
obj.a=10;
}
private:-
it is a access specifier in java it uses for classes, members, variables.
by declaring with private this methods are used in only in specified class or method.
example:-
classAbc{
private void Abc(){ }
}
public:-
it is a access specifier in java it uses for classes, members, variables.
by declaring with public this methods are used in throughout the program
example:-
classAbc{
public void Abc(){ }
}
scope:-
scope of an variable or members, it is based on the place of declaration of a variable or members in class. a inner variable has scope in inner blocks an outer variable has scope in outer as well as inner blocks also.
subclass:-
a subclass is a class with in the class.
example:-
classAbe{
classBde{ }
}
super class :-
a class that is inherited by other class is called super class or parent class
void:-
it is a data type which is returns nothing.
while:-
it is also a control flow statement.
example:-
while(condition)
{ }