Which is the correct way to declare and store a character value to a variable?
A. 
Char ch="A"
B. 
Char ch='A'
C. 
Char [] ch='A'
D. 
Char []ch="A"
2.
How execute a java program? Programe file name is "Example.java".
A. 
Java Example
B. 
Javac Example
C. 
Java Example.java
D. 
Javac Example.java
3.
While key words allow us to use class variable with our declaring the object of the class?
A. 
Final
B. 
Abstract
C. 
Interface
D. 
Static
4.
Which of following is the correct declaration of main method?
A. 
Static public void main(String []a)
B. 
Void public static main()
C. 
Void public static main(String a[])
D. 
Public static main(String a[])
5.
Predict the output.
abstract class cal
{"\n"
abstract public void sum();
abstract public void mul();
}
public class calculation extens cal
{
int a=10,b=20,res=0;
public void sum()
{
res=a+b;
System.out.println("Result is : " +res);
}
public static void main(String []a)
{
calculation c=new calculation();
c.sum();
}
}
Questions: 30 | Attempts: 3029 | Last updated: Mar 22, 2022
Sample Question
Consider the following listed items:
A. Employee() { }
B. public Employee() { }
C. private Employee() { }
Consider the following statements:
I. no-argument constructor, that does not allow instantiation from within the package
II. no-argument constructor, that does not allow instantiation from outside the package
III. no-argument constructor
Which of the following option gives the exact matches of above listed items and statements?
Consider the following listed items:
A. Employee() { }
B. public Employee() { }
C. private Employee() { }
Consider the following statements:
I. no-argument constructor, that does not allow instantiation from within the package
II. no-argument constructor, that does not allow instantiation from outside the package
III. no-argument constructor
Which of the following option gives the exact matches of above listed items and statements?{
JAVA is everywhere, from your microwave oven to DVD player, TV remotes to music players, almost everywhere JAVA is used. Well, cut to short, Core Java focuses on the language basics such as data structures, data types, operators,...
Questions: 45 | Attempts: 682 | Last updated: Mar 21, 2022
Sample Question
Which of the following are uses of Object class?(Choose 3)
Pls do the correction if the answer is wrong in core java.
Questions: 25 | Attempts: 633 | Last updated: Mar 22, 2022
Sample Question
Which of the following may override a method whose signature is void xyz (float f)?1.void xyz(float f)2.public void xyz(float f3,private void xyz(float f)