অণুজীব

java-language – programming-java – কুইজ মডেল টেস্ট অনুশীলন – 8

7814. Java keywords are written in lowercase as well as uppercase.

  1. Depends upon the program
  2. FALSE
  3. TRUE
  4. Depends upon the compiler

7815. Is it possible to execute some statements without main method

  1. Depends upon the compiler
  2. no
  3. yes
  4. Depends upon the program

7816. JVM stands for

  1. Java Very large Machine
  2. Java Very small Machine
  3. Java Virtual Machine
  4. Java Verified Machine

7817. Given: interface A { void x(); } class B implements A { public void x() {} public void y() {} } class C extends B { public void x() {} } And: java.util.List<A> list = new java.util.ArrayList<A>(); list.add(new B()); list.add(new C()); for(A a : list) { a.x(); a.y(); } What is the result?

  1. The code runs with no output.
  2. Compilation fails because of an error in line 20.
  3. An exception is thrown at runtime.
  4. Compilation fails because of an error in line 25.

7818. Can you compare a boolean to an integer?

  1. Depends upon the program
  2. Depends upon the compiler
  3. No
  4. Yes

7819. Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?

  1. java.lang.Character
  2. java.lang.StringBuffer
  3. java.lang.Double
  4. java.lang.String

7820. Observe the following code public void foo( boolean a, boolean b){ if( a ) { System.out.println(A); } else if(a && b) { System.out.println( A&&B); } else { if ( !b ) { System.out.println( notB) ; } else { System.out.println( ELSE ) ; } } } Which is correct?

  1. If a is false and b is false then the output is ELSE
  2. If a is true and b is true then the output is A&&B
  3. If a is false and b is true then the output is ELSE
  4. If a is true and b is false then the output is notB

7821. Which is valid in a class that extends class A?

  1. static protected int method1(int a
  2. int b) { return 0; }private int method1(int a
  3. int b) { return 0; }public short method1(int a
  4. int b) { return 0; }public int method1(int a

7822. Given: public class Threads3 implements Runnable { public void run() { System.out.print("running"); } public static void main(String[] args) { Thread t = new Thread(new Threads3()); t.run(); t.run(); t.start(); } } What is the result?

  1. The code executes and prints "runningrunningrunning".
  2. An exception is thrown at runtime.
  3. The code executes and prints "running".
  4. Compilation fails.

7823. Java compiler translates Java source code into _________

  1. Java bytecode
  2. machine code
  3. assembly code
  4. another high-level language code

আমাদের কাছে থাকা লক্ষ লক্ষ মডেল টেস্ট থেকে প্রাকটিজের জন্য কিছু এখানে তুলে ধরা হল। প্রতিটি অধ্যায়ের উপরে ইশিখন.কম কুইজ চ্যালেঞ্জ এ আছে শত শত মডেল টেস্ট বার বার মডেল টেস্ট দিয়ে নিজেকে যাচাই কর এবং পুরো বাংলাদেশের সকল শিক্ষার্থীর সাথে আপনার মেধা তালিকা দেখুন। প্রশ্নে কোন প্রকার ভুল থাকলে সঠিক উত্তরসহ নিচে কমেন্ট করে জানাবেন, আমরা ঠিক করে দেবো।

Leave a Reply

স্যার, কিভাবে আপনাকে সাহায্য করতে পারি?

Click one of our representatives below

Customer Support
Customer Support

Syeda Nusrat

I am online

I am offline

Technical Support
Technical Support

Ariful Islam Aquib

I am online

I am offline