aspose file tools*
The moose likes Beginning Java and the fly likes Noobie question!!!!please help!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Noobie question!!!!please help!!!!!" Watch "Noobie question!!!!please help!!!!!" New topic
Author

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

Hagaya Hatake
Greenhorn

Joined: Feb 01, 2006
Posts: 5
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

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.


[Jess in Action][AskingGoodQuestions]
Hagaya Hatake
Greenhorn

Joined: Feb 01, 2006
Posts: 5
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

Joined: Jul 08, 2003
Posts: 24187
    
  34

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.
 
 
subject: Noobie question!!!!please help!!!!!