অণুজীব

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

7864. Given: public class MyClass { public Integer startingI; public void methodA() { Integer i = new Integer(25); startingI = i; methodB(i); } private void methodB(Integer i2) { i2 = i2.intValue(); } } If methodA is invoked, which is true ?

  1. i2.equals(startingI) returns false.
  2. None of above
  3. i2 == startingI returns true.
  4. i2 == startingI returns false.

7865. Inner classes can be defined within methods.

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

7866. Given: double input = 314159.26; NumberFormat nf = NumberFormat.getInstance(Locale.ITALIAN); String b; //insert code here Which code inserted, sets the value of b to 314.159,26?

  1. b = nf.equals( input );
  2. b = nf.parseObject( input );
  3. b = nf.parse( input );
  4. b = nf.format( input );

7867. You want to limit access to a method of a public class to members of the same class. Which access accomplishes this objective?

  1. transient
  2. private
  3. protected
  4. public

7868. A class that cannot Be a subclass is calls as ………class

  1. parent class
  2. final
  3. abstract
  4. none of these

7869. Which of the following also known as an instance of a class?

  1. Member Functions
  2. Friend Functions
  3. Member Variables
  4. Object

7870. Given: public enum Title { MR("Mr."), MRS("Mrs."), MS("Ms."); private final String title; private Title(String t) { title = t; } public String format(String last, String first) { return title + " " + first + " " + last; } } public static void main(String[] args) { System.out.println(Title.MR.format("Doe", "John")); } What is the result?

  1. An exception is thrown at runtime.
  2. Compilation fails because of an error in line 15.
  3. Mr. John Doe
  4. Compilation fails because of an error in line 12.

7871. Which of the following can be overloaded?

  1. Both B and C
  2. Functions
  3. Operators
  4. Object

7872. Which of the following is the only technical difference between structures and classes in C++?

  1. Member function and data are by default private in structures but public in classes.
  2. Member function and data are by default public in structures but protected in classes.
  3. Member function and data are by default protected in structures but private in classes.
  4. Member function and data are by default public in structures but private in classes.

7873. Which of these class allows us to get real time data about private and protected member of a class?

  1. ReflectPermission
  2. MembersPermission
  3. GetInformation
  4. java.io

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

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