• 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

Apply your Lateral Thinking

 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does following statement mean?

Java = C++--
 
Ranch Hand
Posts: 1871
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java=C
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my understanding is this..

Both java and c++ take a lot from the C language. c++ got it's name becuase it's like C, but with more... so it's c PLUS stuff... hence c++. c++ has a bunch of stuff like destructors and multiple inheritance that java does not. but java still has more than c. if you take stuff out of c++, you get java. so, it become (c++)--
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Chetan Parekh:
What does following statement mean?

Java = C++--



Java has C plus some more stuff so ++
And at the same time Java doesn't have some stuff of C so --

So it becomes Java = C++--

 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C++ was misnamed in the first place. From the WikiPedia ...

The Combined Programming Language (CPL) was a computer programming language developed jointly between the Mathematical Laboratory at the University of Cambridge and the University of London Computer Unit during the 1960s.

BCPL (Basic Combined Programming Language) is a computer programming language that was designed by Martin Richards of the University of Cambridge in 1966; a response to difficulties with its predecessor CPL.

B was the name of a programming language developed at Bell Labs. It was mostly the work of Ken Thompson with contributions from Dennis Ritchie, and first appeared in 1969 or thereabouts. B was essentially the BCPL system stripped of any component that Thompson felt he could do without, in order to make it fit within the memory capacity of the minicomputers of the time.

The C programming language is a standardized imperative computer programming language developed in the early 1970s by Dennis Ritchie for use on the Unix operating system. I It was named "C" because many of its features were derived from an earlier language called "B".

Now comes the error. C was not the next letter of the alphabet after B, it was the next letter of BCPL. C++ should have been named P. (Rhymes with T, stands for Trouble.) And naturally Java should have been L.
 
fred rosenberger
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ahem...

ALSO from the wikipedia article on C++:

This name is credited to Rick Mascitti (mid-1983) and was first used in December 1983. Earlier, during the research period, the developing language had been referred to as "C with Classes". The final name stems from C's "++" operator (which increments the value of a variable) and a common naming convention of using "+" to indicate an enhanced computer program, for example: "Wikipedia+". According to Stroustrup: "the name signifies the evolutionary nature of the changes from C". C+ was the name of an earlier, unrelated programming language.

Some C programmers have noted that if the statements x=3; and y=x++; are executed, then x==4 and y==3; x is incremented after its value is assigned to y. However, if the second statement is y=++x;, then y==4 and x==4. Following such reasoning, a more proper name for C++ might actually be ++C. However, c++ and ++c both increment c, and, on its own line, the form c++ is more common than ++c. However, the introduction of C++ did not change the C language itself, so an even more accurate name might be "C+1".
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java is not C!

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic