How are the variables declared?
Ans: Variables can be declared anywhere in the method definition and can be initialized during their declaration.They are commonly declared before usage at the beginning of the definition. Variables with the same data type can be declared together. Local variables must be given a value before usage.
What are variable types?
Ans: Variable types can be any data type that java supports, which includes the eight primitive data types, the name of a class or interface and an array.
How do you assign values to variables?
Ans: Values are assigned to variables using the assignment operator =.
What is a literal? How many types of literals are there?
Ans: A literal represents a value of a certain type where the type describes how that value behaves. There are different types of literals namely number literals, character literals, boolean literals, string literals,etc.
What is an array?
Ans: An array is an object that stores a list of items.
How do you declare an array?
Ans: Array variable indicates the type of object that the array holds.
Ex: int arr[];
SOFTWARE COMPANIES
RESUME PREPRATION
INTERVIEW TIPS
C QUESTIONS
chapter 1
chapter 2
chapter 3
chapter 4
chapter 5
chapter 6
chapter 7
chapter 8
chapter 9
chapter 10
View All
DATA STRUCTURE
TECHNICAL QUESTIONS
JAVA
First chapter
Second chapter
Third chapter
Fourth chapter
Fifth chapter
Sixth chapter
Seventh chapter
Eight chapter
ninth chapter
Tenth chapter
eleventh chapter
Twevelth chapter
View All
FILE EXTENSION