programming languages Online Quiz - 173
Description: programming languages Online Quiz - 173 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
What is the output for the below code ? public class A { int k; boolean istrue; static int p; public void printValue() { System.out.print(k); System.out.print(istrue); System.out.print(p); } } public class Test{ public static void main(String argv[]){ A a = new A(); a.printValue();
What is the output for the below code ? 1. public class Test { 2. public static void main(String... args) { 3. int [] index = new int[5]; 4. System.out.println(index instanceof Object); 5. } 6. }
If we do ArrayList lst = new ArrayList(); What is the initial capacity of the ArrayList lst ?
HashMap can be synchronized by _______ ?
What is the output for the below code ? public class A { public void printValue(){ System.out.println("A"); } } public class B extends A { public void printValue(){ System.out.println("B"); } } 1. public class Test { 2. public static void main(String... args) { 3. A b = new B(); 4. newValue(b); 5. } 6. public static void newValue(A a){ 7. if(a instanceof B){ 8. ((B)a).printValue(); 9. } 10. } 11.}
What is the output for the below code ? 1. public class Test {2. int i=8; 3. int j=9; 4. public static void main(String[] args){ 5. add(); 6. } 7. public static void add(){ 8. int k = i+j; 9. System.out.println(k); 10. } 11. }
What does it print? public class CleverSwap { public static void main(String[] args) { int x = 1984; int y = 2001; x ^= y ^= x ^= y; System.out.println("x = " + x + "; y = " + y); } }
What does it print ? /** * Generated by the IBM IDL-to-Java compiler, version 1.0 * from F:\TestRoot\apps\a1\units\include\PolicyHome.idl * Wednesday, June 17, 1998 6:44:40 o'clock AM GMT+00:00 */ public class Test { public static void main(String[] args) { System.out.print("Hell"); System.out.println("o world"); } }
What does this program do ? public class BrowserTest { public static void main(String[] args) { System.out.print("iexplore:"); http://www.google.com; System.out.println(":maximize"); } }
What does this program do ? public class Null { public static void greet() { System.out.println("Hello world!"); } public static void main(String[] args) { ((Null) null).greet(); } }
What does it print ? import java.util.*; public class NameGame { public static void main(String args[]) { Map m = new IdentityHashMap(); m.put("Mickey", "Mouse"); m.put("Mickey", "Mantle"); System.out.println(m.size()); } }
For a COBOL program -
All M0 is not the part of core modules
Following are the main core modules
For a M0 program , main input can be
Output file of a M0 program can has the extension
Main tasks of the M1 processing are
Main output of M1 program is