logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • Which among the following is a scope resolution operator?


  • Options
  • A. :
  • B. ::
  • C. :?
  • D. None

  • Correct Answer
  • :: 

    Explanation

    :: is the scope resolution operator

  • Tags: Software Architect

    Technology problems


    Search Results


    • 1. Why interface method is always public?
    • Discuss
    • 2. Which of the following method declarations are allowed inside interface?

    • Options
    • A. public void m1()
    • B. private void m1()
    • C. protected void m1()
    • D. abstract public void m1()
    • Discuss
    • 3. Inside an interface when should the variables be initialized?

    • Options
    • A. Globally
    • B. Whenever required
    • C. Inside a function
    • D. During the time of declaration
    • Discuss
    • 4. Which of the following statements are equal for a variable declared in the interface ? 1. int X=10 2. public int X=10 3. public static final int X=10

    • Options
    • A. Only 1 and 2 are equal
    • B. Only 2 and 3 are equal
    • C. All are unequal
    • D. All are equal
    • Discuss
    • 5. What is the difference between an Interface and an Abstract class ?
    • Discuss
    • 6. Which kind of inheritance is not supported directly through classes in java?

    • Options
    • A. Multilevel
    • B. Multiple
    • C. Single
    • D. Hirarcheal
    • Discuss
    • 7. 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
    • 8. 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
    • 9. 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
    • 10. 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
    • Discuss


    Comments

    There are no comments.

Enter a new Comment