• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic