www.brightbrains.in

About Us/Home              Tests On Offer              Sample Questions              FAQ              Contact US

Java
Level:-Basic
Q(1) interface is a valid keyword in Java.
A   True
B   False
Q(2) Which one of the following will declare an array and initialize it with five numbers?
A   Array a = new Array(5);
B   int [] a = {23,22,21,20,19};
C   int a [] = new int[5];
D   int [5] array;
Level:-Intermediate
Q(1) Which is the valid declarations within an interface definition?
A   public double methoda();
B   public final double methoda();
C   static void methoda(double d1);
D   None of these
Q(2) Which of these causes a compiler error?
A   int[ ] scores = {3, 5, 7};
B   int [ ][ ] scores = {2,7,6}, {9,3,45};
C   String cats[ ] = {"Fluffy", "Spot", "Zeus"};
D   None of these
Level:-Expert
Q(1) Which concrete implementation of the Map interface should be used for the new instance?
A   TreeMap
B   HashMap
C   LinkedHashMap
D   None of the above
Q(2) Which interface does java.util.Hashtable implement?
A   Java.util.Map
B   Java.util.List
C   Java.util.HashTable
D   Java.util.Collection
BACK      REGISTER NOW
About Us/Home   Terms & Conditions   Cookies Policy   Privacy Policy   FAQ   Contact Us  
   © Copyright 2017 BrightBrains