• Post Reply Bookmark Topic Watch Topic
  • New Topic

JVM Code  RSS feed

 
Madhu Iyer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello am completely new to JAVA.
Can anyone tell me why JVM stores and accepts data only as STRING.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37252
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Madhu,
I don't understand. Java has other types like boolean and int.
 
Madhu Iyer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not java. Java has different datatypes but JVM converts to string and uses it WHY?

I mean, am not quite sure I heard it somewhere...........
 
Scott Selikoff
author
Bartender
Posts: 4093
21
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know that it gets converted to string, but it does have to get converted to machine code. For example, number formats like double really only exist in theory. They are represented by bits in a floating point format.

The same with all types and objects, they represent concepts and ideas via bits. I suppose you could take 'bits' to mean strings but the term string has other meanings in java.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question isn't about EJB or J2EE, but about Core Java. I am going to move this to the Java In General (Advanced) forum.

Mark
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possibly you heard the term "string of bits"? That means binary data - byte code.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Madhu Iyer:
Not java. Java has different datatypes but JVM converts to string and uses it WHY?

I mean, am not quite sure I heard it somewhere...........


You must have misheard...
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this belongs in the Beginner Forum and am moving it thusly.
 
Srinivasan Rengan
Ranch Hand
Posts: 122
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it?
Where did you see this information?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!