Submitted by c-admin on Thu, 05/30/2019 - 01:44
You can call only public and protected constructors of the super class from a subclass if the subclass is not in the same package because only those are inherited.
Select 1 option
A. True
B. False
Submitted by c-admin on Thu, 05/30/2019 - 00:09
The following code snippet will print 4.
int i1 = 1, i2 = 2, i3 = 3;
int i4 = i1 + (i2=i3 );
System.out.println(i4);
Select 1 option
A. True
B. False
Submitted by c-admin on Wed, 05/29/2019 - 04:45
The following class will print 'index = 2' when compiled and run.
class Test{
public static int[ ] getArray() { return null; }
public static void main(String[] args){
int index = 1;
try{
getArray()[index=2]++;
}
catch (Exception e){ } //empty catch
System.out.println("index = " + index);
}
}
Select 1 option
A. True
B. False
Submitted by c-admin on Wed, 05/29/2019 - 00:48
An abstract method cannot be overridden.
Select 1 option
A. True
B. False
Submitted by c-admin on Tue, 05/28/2019 - 21:55
Using a break in a while loop causes the loop to break the current iteration and start the next iteration of the loop.
Select 1 option
A. True
B. False
Pages