- Home
- Interview Questions
- Java
26.
What is container components ?
Container components are components that can contain other components . Containers use layout managers to determine the size and position of their child components.
27.
Difference between the public and non public class ?
A public class can be accessed outside of its package, but a non-public class may not be accessed outside of its package.
28.
Features of Local classes ?
- Like member classes, local classes are associated with a containing instance and can access any members, including privatemembers, of the containing class.
- In addition to accessing fields defined by the containing class, local classes can access any local variables, method parameters, or exception parameters that are in the scope of the local method definition and are declared final.
29.
Tell me few things about Primitive Data types.
- In Java, it defines eight primitive data types. That are char, byte, short, int, long, float, double, and boolean.
- Primitive data types are the simplest data types in java.
- We cannot define this datatype manually because its predifined in java.
- its very useful,if we categorize the primitive datatypes as boolean, numeric, and character data types.
30.
Why we handle the exception separately ?
- Because its enables us to define the main logic of our code together.
- if we are not using the separate exception handlers, the main logic of our code would be lost in combating the exceptional conditions.
- Separating exception handlers are helps to enable us to define alternative code to execute separately from your main code flow when an exceptional condition is met.
- It refers to the block of code that execute when an exceptional condition arises during the code execution.
- it concerns of definig the regular program logic from exception-handling code.