|
Core%20java - Interview Questions and Answers for 'Emory' - 0 question(s) found - Order By Newest |
|
|
| Q1. Function variables are kept in .. | Core Java |
| a. Stack | b. Heap | c. Both Stack and Heap | d. None of them |
| Ans.a. Stack |
|
|
| Q2. Which memory segment holds String Pool ? | Core Java |
| a. Stack | b. Heap | c. Code Segment | d. Class Segment |
| Ans.b. Heap |
|
|
| Q3. 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 |
| a. Stack Memory Segment | b. Heap Memory Segment | c. Runtime Constant Pool within Heap Segment | d. Code Segment |
| Ans.c. Runtime Constant Pool within Heap Segment |
|
|
| Q4. 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 |
| a. Stack Memory Segment | b. Heap Memory Segment | c. Runtime Constant Pool within Heap Segment | d. Code Segment |
| Ans.c. Runtime Constant Pool within Heap Segment |
|
|
| Q5. 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 |
| a. Stack Memory Segment | b. Heap Memory Segment | c. Runtime Constant Pool within Heap Segment | d. Code Segment |
| Ans.a. Stack Memory Segment |
|
|
| Q6. 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 |
| a. Stack Memory Segment | b. Heap Memory Segment | c. Runtime Constant Pool within Heap Segment | d. Code Segment |
| Ans.b. Heap Memory Segment |
|
|
| Q7. Which of following memory segment is cleaned by Garbage Collection Mechanism ? | Core Java |
| a. Stack | b. Heap | c. Code | d. Cache |
| Ans.b. Heap |
|
|
|
|