• Post Reply Bookmark Topic Watch Topic
  • New Topic

Newbie seeking advice and help from  RSS feed

 
Gia Mata
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys I'm new to programming and I would just like to know what happens inside the memory once you run a java application. How do the memory allocate space for your objects or variables? Where does it start?does it start in memory location 1 first when I create my first variable or object? What is the use of variables and how is it used by the memory?Also if I create a variable named String s1 then I created another variable again named s1= "myString" Did I create a new object or I just edited the value of the s1 variable??And if I create a variable int num1 = 10 then I created another variable int num1 = 12 did I create another one or I just edited the num1 variable?? Also how much memory would an object have? Does it depend on how many primitives objects like arrays or strings it have?Also I want to develop 3D games also, in the future is Java going to be great as I know machines in the future will have massive amounts of RAM and the JVM will be better... If you could give me also advice and tips on how to be a good programmer in Java. Thanks in advance for the help and advice guys!
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gia Mata wrote:If you could give me also advice and tips on how to be a good programmer in Java.

Yes. DontSweatIt.

Most of the 9 questions you asked are not only not important (and the link will hopefully help to explain why for a few of them), but actually counter-productive - especially if you change your programming style in order to get some perceived "benefit".

One of the reasons that people choose Java is that it manages memory, leaving you to get on with the business of programming; not worrying about where things get created or how much memory they take up.

Back when I was writing C code, I had an excellent set of books (2) by Stephen Kochan; and about half of the "advanced" one was dedicated to memory management. Now doesn't that seem like an awful lot of time to be spending on something that doesn't actually help you to write a program?

HIH

Winston
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!