All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
advanced java programming
Questions and Answers of
Advanced Java Programming
The garbage collector that uses a single thread is called(a) Simple collector(b) One-thread collector(c) Single collector(d) Serial collector
How many times does the garbage collector call the finalize() method for an object?
Which one is not a HotSpot’s garbage collector?(a) Serial collector(b) Parallel collector(c) Concurrent collector(d) Roubust collector
What happens if an uncaught exception is thrown from during the execution of the finalize() method of an object?
Which one of the following is not a HotSpot’s monitoring tool?(a) Jstat(b) Jmap(c) Jps(d) Jvm
How do you enable/disable call of finalize() method of exit of the application?
Which one of the following is not a step in serial collector?(a) Mark(b) Identify(c) Sweep(d) Compact
Which of the following options is used to select serial collector?(a) -XX:+UseSerialGC(b) -XX:+UseParallelOldGC(c) -XX:+UseConcMarkSweepGC(d) None of the above
Which of these packages contains all the collection classes?(a) Java.lang(b) Java.util(c) Java.net(d) Java.awt
What is Java Collections Framework? List out some benefits of Collections framework.
Which of these classes is not part of Java’s collection framework?(a) Map(b) Array(c) Stack(d) Queue
What are the basic interfaces of Java Collections Framework?
Which of these interfaces is not a part of Java’s collection framework?(a) List(b) Set(c) SortedMap(d) SortedList
Which of these methods deletes all the elements from invoking collection?(a) Clear()(b) Reset()(c) Delete()(d) Refresh()
What is the difference between Enumeration and Iterator interface?
What is Collection in Java?(a) A group of objects(b) A group of classes(c) A group of interfaces(d) None of the mentioned
What is the output of this program?(a) 12885(b) 12845(c) 58881(d) 54881 import java.util. *; class Array { public static void main(String args []) { int array[] = new int [5]; for (int i = 5; i >
What are the different ways to iterate over a list?
How does HashMap work in Java?
What is the output of this program?(a) 0(b) 1(c) True(d) False import java.util. *; class vector { } public static void main(String args []) { Vector obj= new Vector (4, 2); obj.addElement (new
What are the different Collection views provided by Map interface?
What is the output of this program? (a) [3, 5](b) [3, 2](c) [3, 2, 5](d) [3, 5, 2] import java.util. *; class stack { public static void main(String args []) { Stack obj= new Stack(); obj.push
What is the difference between HashMap and Hashtable?
What is the output of this program?(a) {C=8, B=2}(b) [C=8, B=2](c) {A=3, C=8, B=2}(d) [A=3, C=8, B=2] import java.util. *; class hashtable { } public static void main(String args []) { Hashtable
How do you decide between HashMap and TreeMap?
What is the output of this program?(a) {0, 1, 3, 4}(b) {0, 1, 2, 4}(c) {0, 1, 2, 3, 4}(d) {0, 0, 0, 3, 4} import java.util. *; class Bitset { public static void main(String args []) { BitSet obj
What are the similarities and differences between ArrayList and Vector?
Which of these interfaces declares core method that all collections will have?(a) Set(b) EventListner(c) Comparator(d) Collection
What is the difference between Array and ArrayList? When will you use Array over ArrayList?
Which of these interfaces handles sequences?(a) Set(b) List(c) Comparator(d) Collection
What is the difference between ArrayList and LinkedList?
Which of these interfaces must contain a unique element?(a) Set(b) List(c) Array(d) Collection
Which collection classes provide random access of its elements?
Which of these is Basic interface that all other interfaces inherit?(a) Set(b) Array(c) List(d) Collection
Which collection classes are thread-safe?
What is the output of this program?(a) [A, B, C](b) [1, 2, 3](c) {A=1, B=2, C=3}(d) [A=1, B=2, C=3] import java.util. *; class Maps { public static void main(String args []) { } } TreeMap obj new
What is the output of this program?(a) 12345(b) 54321(c) 1234(d) 5432 import java.util. *; class Array ( public static void main(String args []) { int array[] = new int [5]; for (int i = 5; i >
What are concurrent Collection Classes?
What is BlockingQueue?
Suppose you would like to create an instance of a new Map that has an iteration order that is the same as the iteration order of an existing instance of a Map. Which concrete implementation of the
What is Queue and Stack? List their differences.
Which class does not override the equals() and hashCode() methods, inheriting them directly from class Object?(a) String(b) Double(c) StringBuffer(d) Character
What is Comparable and Comparator interface?
Which collection class allows you to grow or shrink its size and provides indexed access to its elements, but whose methods are not synchronized?(a) HashSet(b) LinkedHashSet(c) List(d) ArrayList
What is the difference between Comparable and Comparator interface?
You need to store elements in a collection that guarantees that no duplicates are stored and all elements can be accessed in natural order. Which interface provides that
How can we sort a list of Objects?
Which interface does java.util.Hashtable implement?(a) Map(b) List(c) HashTable(d) Collection
How can we create a synchronized collection from the given collection?
Which interface provides the capability to store objects using a key-value pair?(a) Map(b) Set(c) List(d) Collection
What are the common algorithms implemented in Collections Framework?
Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out)
Which collection class allows you to access its elements by associating a key with an element's value, and provides synchronization?(a) SortedMap(b) TreeMap(c) TreeSet(d) Hashtable
Briefly explain the concept of Java generics.
Why are generics used?(a) Generics make code more fast.(b) Generics make code more optimized and readable.(c) Generics add stability to your code by making more of your bugs detectable at compile
Write the primary purpose of Java generics.
Which of these type parameters is used for a generic class to return and accept any type of object?(a) K(b) N(c) T(d) V
Explain briefly the benefits of using Java generics.
Which of these type parameters is used for a generic class to return and accept a number?(a) K(b) N(c) T(d) V
What is the benefit of Generics in Collections Framework?
Which of these is a correct way of defining generic class?(a) Class name(T1, T2, …, Tn) { /* … */ }(b) Class name { /* … */ }(c) Class name[T1, T2, ..., Tn] { /* … */ }(d) Class name{T1, T2,
Why can’t we write code as List numbers = new ArrayList();?
Which of the following is an incorrect statement regarding the use of generics and parameterized types in Java?(a) Generics provide type safety by shifting more type checking responsibilities to the
Why can’t we create generic array, or write code as List[] array = new ArrayList[10];?
Which of the following characters is used to represent wildcard?(a) ?(b) *(c) #(d) @
Write a generic method to exchange the positions of two different elements in an array.
Which of the following is incorrect for class C and interface I1 and I2? (a) (b) (c)
How is a generic type instantiated (to form a parameterized type)?
Which of the following variable declarations is incorrect?(a) List li = new ArrayList();(b) List ld = new LinkedList();(c) List ln = new ArrayList();(d) List[] a = new ArrayList [10];
Which of the following is incorrect? (a) (b) (c)
What is the raw type and what are its usefulness?
Explain the concept of bounded type parameter.
Which of the following reference types cannot be generic?(a) Anonymous inner class(b) Interface(c) Inner class(d) All of the mentioned
Which specific problem does wildcard solve?
Which of the following is incorrect?(a) List is a sub-type of List(b) List is a sub-type of List(c) List is a sub-type of List(d) List is a sub-type of List
Explain with examples the different kinds of wildcards.
Which of the following represents an unbounded wildcard? (a)
What does javadoc command do?
Which of the following is used to compile Java code?(a) Jar(b) Javac(c) Javadoc(d) Java
Explain with examples the syntax of javadoc command.
Which of the following is used to execute Java code?(a) Javap(b) Javac(c) Javah(d) Java
Which delimiters are used to write javadoc comments?
Which of the following is used to create HTML documentation pages?(a) Javac(b) Javadoc(c) Jdoc(d) Jdb
Describe briefly the different files generated by javadoc.
Which of the following is used to debug Java programs?(a) Javac(b) Javadoc(c) Jdoc(d) Jdb
Describe the structure of javadoc comments.
With javadoc, which of the following denotes a javadoc comment?(a) /**(b) //#(c) /*(d) //**
What is difference between block tags and in-line tag?
Which javadoc tag is used to denote a comment for a method parameter?(a) @param(b) @method(c) @parameter(d) @argument
Write the name of a few tags for methods.
Name the tools that lie in the jdk(a) Javab, javadoc, javav(b) Javac, javatxt & javah(c) Javak, javadoc & javah(d) Javac, javadoc, javah
Write the examples of repeatable and nonrepeatable tags.
Java is a ______ programming language(a) Second generation(b) Third generation(c) Fourth generation(d) None of these
What is the function of javap command?
The javac converts program into(a) Hexadecimal code(b) Octal code(c) Byte code(d) Object code
Describe with examples the syntax of javap command.
What will be the output of the program?(a) Finally(b) Compilation error.(c) The code runs with no output.(d) An exception is thrown at runtime. public class Test { public static void main(String[]
What is the full form of JDK(a) Joint Development Kit(b) Java Demonstrate Kit(c) Java Development Keyword(d) Java Development Kit
What is the function of jcmd?
What is the full form of JVM?(a) Joint Virtual Machine(b) Java Vital Machine(c) Java Virtual Machanic(d) Java Virtual Machine
Showing 1000 - 1100
of 1226
1
2
3
4
5
6
7
8
9
10
11
12
13