Description: programming languages Online Quiz - 21 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
public class test08 { public static void main(String[] args) { System.out.print("H" + "a"); System.out.print('H' + 'a'); } } What is the output?
class A{ public void show(){ System.out.println("This is A"); } class B extends A{ protected void show(){ System.out.println("This is B"); } public class Main{ public static void main(String[] args) { A a = new B(); a.show(); } } What is the output
public class test08 { public static void main(String[] args) { final int start = Integer.MAX_VALUE - 100; final int end = Integer.MAX_VALUE; int count = 0; for (int i = start; i <= end; i++) count++; System.out.println(count); } } What will be the output
public class Change { public static void main(String args[]) { System.out.println(2.00 - 1.10); } } What is the output
By default any class would be supplied with?
interface my_interface{ public void show(); } public class test08 { public static void main(String[] args) { my_interface mi = new B(); mi.show(); } } class A implements my_interface{ public void show(){ System.out.println("This is implemented method "); } } class B extends A{ public void show(){ System.out.println("This is overrided method "); } } What is the output
Is it possible to have a virtual destructor?
What gets printed on the standard output when the class below is compiled and executed. Select the one correct answer. public static ShortCkt { public static void main(String args[]) { int i = 0; boolean t = true; boolean f = false, b; b = (t && ((i++) == 0)); b = (f && ((i+=2) > 0)); System.out.println(i); } }
Which of these are not legal identifiers. Select all the correct answers.
Which of the following statements are true
What does the following paint( ) method draw?
If you run the code below, what gets printed out? String s=new String("Bicycle"); int iBegin=1; char iEnd=3; System.out.println(s.substring(iBegin,iEnd));
x=[1,2,3,4,5] x[3:3]='sagar' print x
x=[1,2,3,4,5] print x[-1]
a=['a','b'] x=[a,'y']
name=[1]*3
Python lists are mutable
Is Abstract Class is Parent Class of ArrayList?
what a Clone method returns in ArrayList?
By using which method ,How can one increase size of an ArrayList?