Results 1 to 8 of 8
- 07-13-2012, 12:19 AM #1
Member
- Join Date
- May 2012
- Location
- USA
- Posts
- 38
- Rep Power
- 0
Why is Java called a programming language?
I'm not trying to start any arguments here, and I know Java is a programming language. I just don't really understand the reasoning of why it's called a programming language. This isn't meant to spark up flame, it's merely a question.

If Java is derived from C++, and if it's merely a higher-level version of C++ then wouldn't it be considered a scripting language since it's only interpreting C++?
I'm aware there are flaws in my logic, I just need them cleared up. I'm confused.
- 07-13-2012, 01:22 AM #2
Senior Member
- Join Date
- Apr 2010
- Location
- Belgrade, Serbia
- Posts
- 278
- Rep Power
- 4
Re: Why is Java called a programming language?
Why told you, or where you read that Java was interpreting C++ = script language?
I found this quote: "A Java application is a stand-alone program that can be executed using a Java interpreter."
When we compile a java code is translated in a byte code.
For example:
After translation with java compiler on byte code it should look something like that:Java Code:for (int i = 2; i < 1000; i++) { for (int j = 2; j < i; j++) { if (i % j == 0) continue outer; } System.out.println (i); }
0: iconst_2
1: istore_1
2: iload_1
3: sipush 1000
6: if_icmpge 44
9: iconst_2
10: istore_2
11: iload_2
12: iload_1
13: if_icmpge 31
16: iload_1
17: iload_2
18: irem
19: ifne 25
22: goto 38
25: iinc 2, 1
28: goto 11
31: getstatic #84; //Field java/lang/System.out:Ljava/io/PrintStream;
34: iload_1
35: invokevirtual #85; //Method java/io/PrintStream.println:(I)V
38: iinc 1, 1
41: goto 2
44: return
source: Java bytecode - Wikipedia, the free encyclopediaLast edited by cselic; 07-13-2012 at 01:37 AM.
- 07-13-2012, 02:14 PM #3
Member
- Join Date
- May 2012
- Location
- USA
- Posts
- 38
- Rep Power
- 0
Re: Why is Java called a programming language?
- 07-13-2012, 02:33 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,459
- Rep Power
- 16
Re: Why is Java called a programming language?
Java's syntax is based on C++, but that's about it.
The JVM could be written in any language...Please do not ask for code as refusal often offends.
- 07-13-2012, 05:44 PM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
Re: Why is Java called a programming language?
First they wanted to call it 'Java the aardvark' but the Society Against Making Fun Of Aardvarks (SAMFOA) protested against it; so they called it a programming language ...
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 07-13-2012, 06:42 PM #6
Senior Member
- Join Date
- Apr 2010
- Location
- Belgrade, Serbia
- Posts
- 278
- Rep Power
- 4
Re: Why is Java called a programming language?
"Java is derived from C++" means that few geeks was having brainstorming sessions where they were trying to make new programming language that would be similar to C++ but better and easier, for example without allocation/deallocation memory, without pointers, without overloaded operators,...
""Java interprets C++"." Main goal of java programming language is that it should be platform independent. Java solves this problem using the concept of Java Virtual Machine (JVM).
JVM provides a virtual CPU and a virtual instruction set (called byte code).
The Java compiler transforms a Java source program into byte code.
A Java interpreter (called Java Runtime) converts the byte code instructions to native processor instructions and executes them.
- 07-13-2012, 06:51 PM #7
Member
- Join Date
- Mar 2011
- Posts
- 94
- Rep Power
- 0
Re: Why is Java called a programming language?
Java is a programming language that is both compiled and interpreted.
A Java program is compiled into bytecodes. These bytecodes are platform-independent. Any Java Virtual Machine (JVM) can interpret these bytecodes, as long as it is a compatible JVM version.
- 07-13-2012, 08:19 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,399
- Blog Entries
- 7
- Rep Power
- 17
Re: Why is Java called a programming language?
Some slight corrections: @cselic: Java does have pointers; each non primitive type variable is a pointer; Java doesn't have pointer arithmetic; @FlipPoker: most (if not all) off the byte code is translated to raw machine code during runtime by the JIT compiler (and the HotSpot engine); my guess is that future Java implementations abandon the HotSpot mechanism completely and leave it all up to the JIT compiler.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
Why is Java suitable language for web programming
By SynGc in forum New To JavaReplies: 5Last Post: 05-21-2012, 10:23 PM -
Is java a power full programming language? can java do this?
By Jhovarie in forum New To JavaReplies: 9Last Post: 03-07-2011, 04:05 AM -
To display chinese/japanese language Character filename - Java Programming
By bngkrish in forum Java ServletReplies: 0Last Post: 04-19-2009, 06:38 PM -
Creating a new programming language?
By hawaiifiver in forum Forum LobbyReplies: 0Last Post: 03-21-2009, 08:46 PM -
TOM programming language 2.5
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-14-2007, 08:31 PM


3Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks