Tag: programming languages

Questions Related to programming languages

  1. public void amethod(int i) throws FileNotFoundException{ }

  2. public void amethod(int i) throws IOException, RuntimeException{ }

  3. public void amethod(int i) throws RuntimeException{ }

  4. public void amethod(int i) throws Exception{ }

  5. public void amethod(int i) { }

  6. public void amethod(int i) throws Throwable{ }


Correct Option: A,B,C,E

which of the following modifiers can be applied to top level class(i.e., a class which is not enclosed by other class) select all that apply

  1. private

  2. protected

  3. transient

  4. public

  5. final


Correct Option: D,E
  1. It exhibits high cohesion

  2. It exhibits low cohesion

  3. It exhibits tight coupling

  4. It exhibits loose coupling

  5. None of the Above


Correct Option: B

Select correct answer Given: Class A{ A(){ System.out.print(“A”); } } Class B extends A{ B(){ this(4); super(); System.out.print(“B”); } B(int i){ System.out.print(“C”); } }

  1. Does not compile

  2. prints "ABC"

  3. prints "ACB"

  4. prints "CAB"

  5. run time exception


Correct Option: A
  1. java.util.HashSet

  2. java.util.LinkedHashMap

  3. java.util.Hashtable

  4. java.util.Vector

  5. none of these


Correct Option: E

How does the following macros will resolve? What will be the output in log file? %let one=two; %let two=three; %let three=one; %put &one; %put &&one; %put &&&one;

  1. two, two, one

  2. two, three, one

  3. two, two, three

  4. two, two, two


Correct Option: C

Which date function advances a date, time or date/time value by a given interval?

  1. INTCK

  2. INTNX

  3. INTCX

  4. INTNK


Correct Option: B