অণুজীব

 

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

7774. What is the data type of out object

  1. final
  2. static final
  3. None of the above
  4. static

7775. Given a correctly compiled class whose source code is: package com.sun.sjcp; public class Commander { public static void main(String[] args) { // more code here } } Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.” (current directory). Which command line correctly runs Commander?

  1. java com.sun.sjcp.Commander
  2. java Commander
  3. java com/sun/sjcp/Commander
  4. java -cp com.sun.sjcp Commander

7776. Given: 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 class use the Shape class correctly?

  1. public class Circle implements Shape { private int radius; }
  2. public abstract class Circle extends Shape { private int radius; }
  3. None of above
  4. public class Circle extends Shape { private int radius; public void draw(); }

7777. Examine the following list: a. Stores key/value pairs. b. Allows null elements, keys, and values. c. Duplicate entries replace old entries. d. Entries are not sorted using a comparator or the Comparable interface. Which of these classes provides the specified features?

  1. HashMap
  2. LinkedHashMap
  3. LinkedList
  4. LinkedHashSet

7778. How can we return an object from a function?

  1. using object class.
  2. simply return object name.
  3. creating returntype as object and then returning object name
  4. none of the above

7779. Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out) sequence?

  1. java.util.ArrayList
  2. java.util.LinkedHashMap
  3. java.util.HashMap
  4. java.util.TreeMap

7780. Which of these method Map class is used to

  1. set()
  2. look()
  3. search()
  4. get()

7781. Given: public class Drink implements Comparable { public String name; public int compareTo(Object o) { return 0; } } and: Drink one = new Drink(); Drink two = new Drink(); one.name= “Coffee”; two.name= “Tea”; TreeSet set = new TreeSet(); set.add(one); set.add(two); A programmer iterates over the TreeSet and prints the name of each Drink object. What is the result?

  1. Tea
  2. Coffee Tea
  3. Coffee
  4. Compilation fails.

7782. What type of data does BufferedReader, can read

  1. a character
  2. an array
  3. All of the above
  4. a complete line

7783. Given: String test = “a1b2c3”; String[] tokens = test.split(“\d”); for(String s: tokens) System.out.print(s + ” “); What is the result?

  1. abc
  2. a1b2c3
  3. a2b1c3
  4. 123

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

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