Java - Online Test - Architect - javasearch.buggybread.com


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Architect' - 16 questions found


Action Class is singleton and hence not thread safe in ..Struts
All versions of Struts
Struts 1
Struts 2
None of Struts versions

  struts  j2ee  mvc frameworks  struts1  struts2

Which of the following collections stores its elements in insertion Order ?Core Java
HashMap
TreeMap
LinkedHashMap
LinkedMap

  linkedhashmap  collections  java  map

POM stands for ... Maven
Project Object Model
Project Oriented Model
Prospective Object Model
Prospective Objective Model

  maven  pom

What will be the output of exceuting main method ?

public static void main(String[] args){
      List list = new ArrayList();
      list.add(1);
      list.add(2);
      list.add(3);
      System.out.println(list);
   }
Core Java
1,2,3
Order cannot be determined
compilation error
3,2,1

  collections  list  arraylist

What is Lazy Initialization in Hibernate ?Hibernate
Feature to load the dependencies from Cache
Feature to load all objects and relationships in advance before they can be used
Feature to not load dependencies and relationship in advance and load when required
Feature to not load the dependencies and relationships at all

  Lazy Initialization

Which of the following is not the benefit of Lazy Initialization in Hibernate ?Hibernate
Laod When required provides better performance
Object stays lighter
Less number of Database calls
Less load on Database

  Lazy Initialization  Lazy Fetching

Which of the following is not an advantage of JSON over XML ?JSON
Lighter and Faster
Object Representation
Supports multiple data types
Backward compatible with all XML applications

  JSON  XML

Binary Search requires that the collection should beAlgorithm
Sorted in Ascending Order
Sorted in Descending Order
Sorted in any Order
Unsorted

  Binary Search  Search  Algorithm

Which Java version introduced Lambda expressions ?Core Java
Java 5
Java 7
Java 8
Java 9

  

Which of following is not true ?XML
Dom Parser loads the whole doument at once in memory
A DOM Parser is much more memory efficient
Dom Parser doesn't load the whole doument at once in memory
A SAX Parser is much more memory efficient

  xml  xml parsers

In this code

public class BuggyBread1{
   private static String staticVariable = "static Variable";
   
   private String instanceVariable = "instance Variable";
   
   public static void main (String args[]) {
String localVariable = "local Variable";
}
}

Where will the value 'static Variable' be stored ?
Core Java
Stack Memory Segment
Heap Memory Segment
Runtime Constant Pool within Heap Segment
Code Segment

  memory manegement

In this code

public class BuggyBread1{
   private static String staticVariable = "static Variable";
   
   private String instanceVariable = "instance Variable";
   
   public static void main (String args[]) {
String localVariable = "local Variable";
}
}

Where will the value 'static Variable' be stored ?
Core Java
Stack Memory Segment
Heap Memory Segment
Runtime Constant Pool within Heap Segment
Code Segment

  memory management

In this code

public class BuggyBread1{
   private static String staticVariable = "static Variable";
   
   private String instanceVariable = "instance Variable";
   
   public static void main (String args[]) {
String localVariable = new String("local Variable");
}
}

Where will the value 'local Variable' be stored ?
Core Java
Stack Memory Segment
Heap Memory Segment
Runtime Constant Pool within Heap Segment
Code Segment

  memory management

In this code

public class BuggyBread1{
   private static String staticVariable = new String("static Variable");
   
   private String instanceVariable = "instance Variable";
   
   public static void main (String args[]) {
String localVariable = "local Variable";
}
}

Where will the value 'static Variable' be stored ?
Core Java
Stack Memory Segment
Heap Memory Segment
Runtime Constant Pool within Heap Segment
Code Segment

  memory management

Which of following memory segment is cleaned by Garbage Collection Mechanism ?Core Java
Stack
Heap
Code
Cache

  memory management  garbage collection

Which of following is not the resolution for preventing LazyInitializationException?Hibernate
Set fetch=FetchType.EAGER for Dependent entity mapping
Make sure that we are accessing the dependent objects before closing the session
Make sure that we are accessing the dependent objects after closing the session
Wrap the complete access within Transaction

  Hibernate  LazyInitializationException







comments powered by Disqus