File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes In java, what primitives means... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "In java, what primitives means..." Watch "In java, what primitives means..." New topic
Author

In java, what primitives means...

Zeeshan Liaqat
Greenhorn

Joined: Jul 13, 2007
Posts: 9
The Java platform supports multithreading at the language level with the addition of sophisticated synchronization primitives: the language library provides the Thread class, and the run-time system provides monitor and condition lock primitives. At the library level, moreover, Java technology's high-level system libraries have been written to be thread safe: the functionality provided by the libraries is available without conflict to multiple concurrent threads of execution.

A white paper written by James Gosling and Henry McGilton.


I'm unable to understand the primitives thing. If some one can explain this.

Thank you
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Here they are using "primitive" to mean "a simple building block from which more complex concepts can be built."


[Jess in Action][AskingGoodQuestions]
Zeeshan Liaqat
Greenhorn

Joined: Jul 13, 2007
Posts: 9
Originally posted by Ernest Friedman-Hill:
Here they are using "primitive" to mean "a simple building block from which more complex concepts can be built."


okay... they way I understand now is that Java platform supports multithreading at language level with addition sophisticated synchronization of basic elements of program.

Java is providing multithreading at langauge level and in the same time also running/computing blocks of a complex program.

Correct me if i'm wrong.

Thank you...
Bob Ruth
Ranch Hand

Joined: Jun 04, 2007
Posts: 320
In this context I would think of "primitives" as a lower level support facility. In other words, these "primitives" actually manage the mechanics of establishing and controlling threads.....

the other reference to "higher level library" I would interpret as the regular API library methods that you call.... and interpret what it is saying as "the normal, average, user API methods" are designed to be safe for use in a threaded environment.

Thats the spin I get off of it...


------------------------
Bob
SCJP - 86% - June 11, 2009
Jagan Nambi
Greenhorn

Joined: Jan 16, 2004
Posts: 15
A primitive is a "built-in" data type. The only primitives in the Java language are byte, short, int long, float, double and boolean.

Using these primitive data types, you can build other classes, thus meaning that anything else is a "derived data type".

To give an analogy, the primitive colors are Red, Green & Blue (RGB). Using these "primitive" colors red, blue and green you can mix them in different ways and compose other "derived colors" such as cyan, magenta, etc.

Hope the definition and the analogy helped.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

Originally posted by Jagan Nambi:

Hope the definition and the analogy helped.


Actually, no, it wouldn't have helped at all.

Zeeshan Liaqat, please ignore Jagan's post.

Jagan, you posted without reading the question -- please don't do that!
Michael Jennings
Greenhorn

Joined: Jul 04, 2007
Posts: 20
hi zeeshan

here by primitives, it means services built into the language that accomplish tasks which you would otherwise have to do yourself.

for example, when you start the execution of a program, the command that you use in turn internally uses some set of methods to load the program into memory and start it executing/running. these set of (available) methods are then said to be primitives as they provide the basic way of interacting with the system/environment.

to put it in other way(in so many words). as you need the ints, floats, chars, etc to represent your data at the least if you are using a high level language, similarly you need the basic set of methods to interact with your program's/routine's environment comprising among other things the data. the ints, floats, chars are the data primitives and the set of methods are the service primitives.
Zeeshan Liaqat
Greenhorn

Joined: Jul 13, 2007
Posts: 9
Thank you for all of your post. I'm getting the handle of it now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In java, what primitives means...