Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java heap example

package com.journaldev.test;package com.journaldev.test;
public class Memory {
 public static void main(String[] args) { // Line 1 int i=1; // Line 2 Object obj = new Object(); // Line 3 Memory mem = new Memory(); // Line 4 mem.foo(obj); // Line 5 } // Line 9
 private void foo(Object param) { // Line 6 String str = param.toString(); //// Line 7 System.out.println(str); } // Line 8
}
Source by stackify.com #
 
PREVIOUS NEXT
Tagged: #java #heap
ADD COMMENT
Topic
Name
7+6 =