23)What is explicit casting?
A)Explicit casting in the process in which the complier are specifically informed to about transforming the object.
Example
long i = 700.20;
int j = (int) i; //Explicit casting
24)What is the Java Virtual Machine (JVM)?
A)The Java Virtual Machine is software that can be ported onto various hardware-based platforms
25)What do you understand by downcasting?
A)The process of Downcasting refers to the casting from a general to a more specific type, i.e. casting down the hierarchy
26)What are Java Access Specifiers?
Or
What is the difference between public, private, protected and default Access Specifiers?
Or
What are different types of access modifiers?
A)Access specifiers are keywords that determine the type of access to the member of a class. These keywords are for allowing
privileges to parts of a program such as functions and variables. These are:
• Public : accessible to all classes
• Protected : accessible to the classes within the same package and any subclasses.
• Private : accessible only to the class to which they belong
• Default : accessible to the class to which they belong and to subclasses within the same package
27)Which class is the superclass of every class?
A)Object.
No comments:
Post a Comment