File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Noobie question!!!!please help!!!!!

 
Hagaya Hatake
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I wanted to know if there's a difference between built-in ADT and ADT provided in classes. And if there is what's the difference?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Welcome to JavaRanch!

There are no "built-in ADTs" in Java; a class is a class. String, Thread, Object, ArrayList, HashMap, etc, are all just classes in the standard library. So the answer to your first question is "no".

Have a look at this when you get a chance.
 
Hagaya Hatake
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the welcome!!!
Are you sure that there's no built-in ADT in java???
Because I think that I've seen somewhere that float is a built-in ADT provided by java.
And by the way, I was unable to access the link you provided.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Hagaya Hatake:
Thanks for the welcome!!!
Are you sure that there's no built-in ADT in java???
Because I think that I've seen somewhere that float is a built-in ADT provided by java.


Java has "primitive types", and it has "classes". I suppose some people might want to call primitive types "ADTs" (a very old-fashioned term; not used much these days!) but usually the term applies to more complex types than byte, short, char, int, long, float, double, or boolean (Java's built-in primitive types.)

But if you're asking what's the difference between primitives and objects: primitives are indeed "built-in", rather than being defined by Java code as objects are. You can't define your own primitives. Primitives are stored directly in variables, while objects are stored in a separate area of memory called the "heap", and variables contain only a reference to them.



And by the way, I was unable to access the link you provided.


The server it's on is down for the moment; try back later.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic