• 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

In java, what primitives means...

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
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
Here they are using "primitive" to mean "a simple building block from which more complex concepts can be built."
 
Zeeshan Liaqat
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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...
 
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
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 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!
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for all of your post. I'm getting the handle of it now.
 
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic