
java-collections – programming-java – কুইজ মডেল টেস্ট অনুশীলন – 5
7784. Which of the following are true statements?
- None of the above.
- The ListIterator interface was introduced with Java 1.2 to replace the older Iterator interface that was released with Java 1.0.
- The Iterator interface declares only two methods: hasMoreElement and nextElement.
- The ListIterator interface extends both the List and Iterator interfaces.
7785. The file MyNewVector.java is shown in the exhibit. What is the result? package foo; import java.util.Vector; private class MyVector extends Vector { int i = 1; public MyVector() { i = 2; } } public class MyNewVector extends MyVector { public MyNewVector () { i = 4; } public static void main (String args []) { MyVector v = new MyNewVector(); } }
- Compilation will fail at ‘i = 4;’
- Compilation will succeed.
- Compilation will fail at ‘int i = 1;’
- Compilation will fail at ‘private class MyVector extends Vector {‘.
7786. Which of these method is used to reduce the
- trim()
- trimSize()
- trimTosize()
- trimToSize()
7787. Which of these class contains the methods
- BUfferedOutputStream
- System.out
- System
- PrintStream
7788. Given: abstract public class Employee { protected abstract double getSalesAmount(); public double getCommision() { return getSalesAmount() * 0.15; } } class Sales extends Employee { // insert method here } Which method, inserted independently, correctly complete the Sales class?
- None of above
- double getSalesAmount() { return 1230.45; }
- private double getSalesAmount() { return 1230.45; }
- public double getSalesAmount() { return 1230.45; }
আমাদের কাছে থাকা লক্ষ লক্ষ মডেল টেস্ট থেকে প্রাকটিজের জন্য কিছু এখানে তুলে ধরা হল। প্রতিটি অধ্যায়ের উপরে ইশিখন.কম কুইজ চ্যালেঞ্জ এ আছে শত শত মডেল টেস্ট বার বার মডেল টেস্ট দিয়ে নিজেকে যাচাই কর এবং পুরো বাংলাদেশের সকল শিক্ষার্থীর সাথে আপনার মেধা তালিকা দেখুন। প্রশ্নে কোন প্রকার ভুল থাকলে সঠিক উত্তরসহ নিচে কমেন্ট করে জানাবেন, আমরা ঠিক করে দেবো।