Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

memory allocation question

  Asked By: Ted    Date: Sep 14    Category: Java    Views: 598
  

In the following code, is there memory allocated for the string:

public void foo {
String s;
}

public void foo {
String s="";
}

public void foo {
String s = new String();
}

in c, int i; doesnt allocate any memory, I am wondering if this is
similar in Java.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on memory allocation question Or get search suggestion and latest updates.




Tagged: