What is the use of initialization of variables ?
avoid error
remove garbage value if any
reduce memory space
avoid duplication of variables
If txt1 is a Text field in GUI window, Which method is used to take the value of that text field ?
getValue ( )
getText ( )
setValue( )
setText( )
Which method isused to show messagebox on the GUI window?
JOptionPane. MessageBox(true,”Message to print”);
JOptionPane.showMessageDialog(null,”Message to print”);
JOptionPane.showMessageBox(true,”Message to print”);
Which is not an assignment operation?
a%=b ;
a/=b ;
a==b ;
a+=b;
System.out.println(“SMART”);
System.out.println(“INDIA”);What will be the output of the above code?
SMARTINDIA
SMART
INDIA
SMART INDIA
INDIASMA INDIA
A complete unit of execution of a program is called
Scope
Block
Statement
Expression
What is the default type of the value we taken from a GUI component?
Integer
Char
Double
Text
What is the initial default value of a float number?
0
0.00F
0.0F
1.0
Which is not a reference datatype?
Boolean
Class
Interface
Array
Special symbols used to perform a particular task is called
Keyword
Operators
Literals
Variables