Java - Online Test - Heap memory - javasearch.buggybread.com


Share

Search Java Test Questions


 223 test questions in repository.




Java - Test Questions on 'Heap memory' - 8 questions found


When String literals are compared using ==, they always returns true if the string values are same because .. Core Java
of overridden compareTo method
of overridden compare method
of String Pool
== means that the object contents are equal

  

Function variables are kept in ..Core Java
Stack
Heap
Both Stack and Heap
None of them

  memory management  stack  heap

Which memory segment holds String Pool ?Core Java
Stack
Heap
Code Segment
Class Segment

  memory management  string pool

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







comments powered by Disqus