logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • X implements Y, Z Arguments: 1. X should be class 2. Y, Z should be interfaces


  • Options
  • A. Only 1 is true
  • B. Only 2 is true
  • C. Both 1 and 2 are true
  • D. None

  • Correct Answer
  • Both 1 and 2 are true 

    Explanation

    Both the statements are true 

  • Tags: IT Trainer

    Technology problems


    Search Results


    • 1. public abstract class Shape { private int x; private int y; public abstract void draw(); public void setAnchor(int x, int y) { this.x = x; this.y = y; } } Which two classes use the Shape class correctly?

    • Options
    • A. public class Circle implements Shape { private int radius;
    • B. public abstract class Circle extends Shape { private int radius; }
    • C. public class Circle extends Shape { private int radius; public void draw();
    • D. None
    • Discuss
    • 2. public abstract class Shape { private int x; private int y; public abstract void draw(); public void setAnchor(int x, int y) { this.x = x; this.y = y; } } Which two classes use the Shape class correctly?

    • Options
    • A. public class Circle implements Shape { private int radius;
    • B. public abstract class Circle extends Shape { private int radius; }
    • C. public class Circle extends Shape { private int radius; public void draw();
    • D. None
    • Discuss
    • 3. public class Threads2 implements Runnable { public void run() { System.out.println("run."); throw new RuntimeException("Problem"); Which among the following is true? } public static void main(String[] args) { Thread t = new Thread(new Threads2()); t.start(); System.out.println("End of method."); } }

    • Options
    • A. java.lang.RuntimeException: Problem
    • B. run. java.lang.RuntimeException: Problem
    • C. End of method. java.lang.RuntimeException: Problem
    • D. End of method. run. java.lang.RuntimeException: Problem
    • Discuss
    • 4. Which kind of inheritance is not supported directly through classes in java?

    • Options
    • A. Multilevel
    • B. Multiple
    • C. Single
    • D. Hirarcheal
    • Discuss
    • 5. Which among the following is a scope resolution operator?

    • Options
    • A. :
    • B. ::
    • C. :?
    • D. None
    • Discuss
    • 6. What is a class, member and local variable?
    • Discuss
    • 7. What is JDBC Driver ?
    • Discuss
    • 8. What are the steps required to execute a query in JDBC?
    • Discuss
    • 9. What is the difference between a constructor and a method?
    • Discuss
    • 10. What is an abstract class?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment