programming languages Online Quiz - 21
Description: programming languages Online Quiz - 21 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
By using which method ,How can one increase size of an ArrayList?
what a Clone method returns in ArrayList?
Is Abstract Class is Parent Class of ArrayList?
Python lists are mutable
name=[1]*3
a=['a','b'] x=[a,'y']
x=[1,2,3,4,5] print x[-1]
x=[1,2,3,4,5] x[3:3]='sagar' print x
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));
What does the following paint( ) method draw?
Which of these are not legal identifiers. Select all the correct answers.
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); } }
Is it possible to have a virtual destructor?
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
By default any class would be supplied with?
public class Change { public static void main(String args[]) { System.out.println(2.00 - 1.10); } } 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
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) { System.out.print("H" + "a"); System.out.print('H' + 'a'); } } What is the output?