Interview Questions and Answers for 'T' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Interview Questions and Answers - Order By Rating

   next 30
 Q2491. Which of the following collection maintain its elements in Natural Sorted order ?

a. HashMap
b. TreeMap
c. LinkedHashMap
d. LinkedMap
Ans. TreeMap

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     treemap   collections   java   sorted collections   map


 Q2492. Which of the following collections stores its elements in insertion Order ?

a. HashMap
b. TreeMap
c. LinkedHashMap
d. LinkedMap
Core Java
Ans. LinkedHashMap

  Sample Code for LinkedHashMap

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     linkedhashmap   collections   java   map


 Q2493. If we add Enum constants to a sorted collection ( Treemap , TreeSet ), What will be the order in which they will be maintained ?

a. Sorted Collection wont maintain them in any order.
b. Insertion Order
c. Order in which constants are declared.
d. Natural Sorting Order.
Ans. Order in which constants are declared.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     enum   collections   sorted collections   treemap   treeset   compareto   comparable   java


 Q2494. If we try to add duplicate key to the HashMap, What will happen ?

a. It will throw an exception.
b. It won't add the new Element without any exception.
c. The new element will replace the existing element.
d. Compiler will identify the problem and will throw an error.
Ans. The new element will replace the existing element.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hashmap   map   collections   java


 Q2495. In what order the elements of a HashSet are retrieved ?

a. Random Order
b. Insertion Order
c. Natural Sorting Order
d. Inverse Natural Sorting Order
Core Java
Ans. Random Order

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     collections   set   hashset   java

Try 1 Question(s) Test


 Q2496. Which interface does java.util.Hashtable implement ?

a. List
b. Set
c. Collection
d. Map
Core Java
Ans. Map

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     hashtable   java   collections


 Q2497. Which of the following is false ?

a. HashMap came before HashTable.
b. HashMap allows null values whereas Hashtable doesn’t allow null values.
c. HashTable and HashMap allow Key-Value pairs.
d. Hashtable is synchronized whereas HashMap is not.
Ans. HashMap came before HashTable.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     map   hashmap   hashtable   collection   java

Try 2 Question(s) Test


 Q2498. Which of the following is true ?

a. We can serialize static variables
b. We can serialize transient variables
c. We can serialize final variables
d. We can serialize instance methods
Ans. We can serialize final variables

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     serialization   java   file io

Try 1 Question(s) Test


 Q2499. Which of the following is not the use of this keyword ?

a. Passing itself to another method
b. To call the static method
c. Referring to the instance variable when local variable has the same name
d. Calling another constructor in constructor chaining
Ans. To call the static method

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     this   this keyword   java


 Q2500. Which of the collections allows null as the key ?

a. HashTable
b. HashMap
c. TreeMap
d. LinkedHashMap
Core Java
Ans. HashMap

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   collections   map  hashtable     Asked in 2 Companies      basic        frequent


 Q2501. What is the initial state of a thread when it is created and started ?

a. Wait
b. Running
c. Ready
d. Sleep
Ans. Ready

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multithreading   thread states


 Q2502. What state does a thread enter when it terminates its processing?

a. Wait
b. Ready
c. Dead
d. Running
Ans. Dead

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multithreading   thread states


 Q2503. How many bits are used to represent Unicode ?

a. 8 bits
b. 16 bits
c. 24 bits
d. 32 bits
Ans. 16 bits

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   character coding   character encoding


 Q2504. How do I determine which POM contains missing transitive dependency?

a. mvn -A
b. mvn -M
c. mvn -R
d. mvn -X
Maven
Ans. mvn -X

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     maven   maven transitive dependencies


 Q2505. Which of the following annotation is used to avoid executing Junits ?

a. @explicit
b. @ignore
c. @avoid
d. @NoTest
Ans. @ignore

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   testing   junit   unit testing


 Q2506. Which of the following is not the advantage of Mocking frameworks ?

a. It helps testing the module independently
b. It helps in faster unit testing
c. It helps in testing code even when external dependencies like service calls are not working
d. It helps in doing end to end Integration Testing
Ans. It helps in doing end to end Integration Testing

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     mocking frameworks   mockito   unit testing   junits


 Q2507. Which of the following is fastest to locate the DOM element ?

a. document.getElementById
b. document.getElementByName
c. document.ElementName.SubElementName
d. They all result in similar performance in retrieving the DOM element.
Ans. document.ElementName.SubElementName

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     html   dom   javascript


 Q2508. Which of the following is not a Table tag ? a. th b. td c. tb d.
Ans. tb

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     html   table   html tags


 Q2509. Why should we have Javascript method definitions within HTML Head section ?

a. Its safe to have javascript code within head section
b. Head section gets loaded even if there is any error in loading HTML page
c. Head section gets executed first and hence assure that js method definition will be loaded before they are called
d. So that we can have method definition and method call at the same place
Ans. Head section gets executed first and hence assure that js method definition will be loaded before they are called

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     html   head section   javascript


 Q2510. Which of the following is usually not part of EAR file ?

a. Server Configuration files
b. HTML and Media Files
c. Application Configuration files
d. Class files
Ans. Server Configuration files

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     ear   deployment   servers   java


 Q2511. Which of the following file is called deployment descriptor ?

a. application.xml
b. project.xml
c. web.xml
d. build.xml
Java EE
Ans. web.xml

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     configuration files   deployment   server   java


 Q2512. How can we execute a Java class independently if it doesn't have a static main method ?

a. By initiating the flow in any of the static method
b. By initiating the flow in any of static block
c. By initiating the flow in any other instance method named as main
d. By initiating the flow in any other instance method named as main and making it final
Ans. By initiating the flow in any of static block

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     main method   java


 Q2513. Which of the following are usually manual ?

a. Unit Test
b. Integration Test
c. Load Test
d. Both a and c
Ans. Integration Test

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     testing   manual testing   automated testing


 Q2514. Which of the following nearly involves same Test execution plan ?

a. Unit and Integration tests
b. Unit and Regression Tests
c. Integration and Performance Tests
d. Performance and Load Tests
Ans. Performance and Load Tests

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     testing


 Q2515. What is the size of long data type ?

a. 16 bit
b. 32 bit
c. 64 bit
d. 128 bit
Ans. 64 bit

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data types


 Q2516. What is the size of double type ?

a. 16 bit
b. 32 bit
c. 64 bit
d. 128 bit
Ans. 64 bit

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data types


 Q2517. What is the size of short type ?

a. 8 bit
b. 16 bit
c. 32 bit
d. 128 bit
Ans. 16 bit

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   data types


 Q2518. Which keyword is used to provide explicit access of a code block to single thread ?

a. Transient
b. Final
c. Explicit
d. Synchronized
Core Java
Ans. Synchronized

  Sample Code for Synchronized

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   threads   multithreading     Asked in 2 Companies      basic


 Q2519. Which of the following exception is thrown when we try to access element which is beyond the size ?

a. NullPointerException
b. ArrayIndexOutOfBoundException
c. ArithmeticException
d. ParseException
Ans. ArrayIndexOutOfBoundException

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   exceptions   error handling


 Q2520. Checked exception needs to be ...

a. Caught
b. Method needs to declare that it throws these exception
c. Either A or B
d. Both A and B
Ans. Either A or B

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   exceptions   checked exceptions


previous 30   next 30

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: