| | |
diff c++ and java..?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2009
Posts: 11
Reputation:
Solved Threads: 0
the exact diff between c++ and java technically........need to submit a assignment
Nobody is gonna do that for you. Seriously?
However, here are a few things I have noted.
hello world in java
[1]
hello world in c++ (note the difference in file size)
Java is perfect, extremely fast, has no bugs! The fact that it *just works* on ANY operating system makes it superior to c++.
C++ also tends to be slower than java (scientifically proven) as monkeys tend to write code in c++ as opposed to humans writing code in java.
[1] An optimized version of java's hello world by James Gosling
However, here are a few things I have noted.
hello world in java
C++ Syntax (Toggle Plain Text)
interface Printer { void print ( Message message ); } class Message { private String message; public Message ( String message ) { this.message = message; } public void print ( Printer printer ) { printer.print ( this ); } public String toString() { return message; } } abstract class AbstractPrinterFactory { public static AbstractPrinterFactory getFactory() { return new SystemOutPrinterFactory(); } public abstract Printer getPrinter(); } class SystemOutPrinterFactory extends AbstractPrinterFactory { public Printer getPrinter() { return new SystemOutPrinter(); } } class SystemOutPrinter implements Printer { public void print ( Message message ) { System.out.println ( message ); } } class HelloWorld { public static void main ( String[] args ) { Message message = new Message ( "Hello, World!" ); AbstractPrinterFactory factory = AbstractPrinterFactory.getFactory(); Printer printer = factory.getPrinter(); message.print ( printer ); } }
hello world in c++ (note the difference in file size)
C++ Syntax (Toggle Plain Text)
#include <iostream> using namespace std; int main() { cout << "Hello, World!" << endl; return 0; // it's very important, because you win, when ALL is Nothing ; } }
Java is perfect, extremely fast, has no bugs! The fact that it *just works* on ANY operating system makes it superior to c++.
C++ also tends to be slower than java (scientifically proven) as monkeys tend to write code in c++ as opposed to humans writing code in java.
[1] An optimized version of java's hello world by James Gosling
C++ Syntax (Toggle Plain Text)
public class HelloWorld { public class Program { public class start implements Program { public class init excludes mouse { public class HelloWorld implements init { public int main() { System.Java.Out.Output.Console.Write.Line.Text.White.BlackBackground.Last.Lineofcode.this.time.will.really.finish("Hello, world!"); } } } } } }
Last edited by iamthwee; May 29th, 2009 at 7:09 am.
*Voted best profile in the world*
>Java is perfect, extremely fast, has no bugs! The fact that it *just >works* on ANY operating system makes it superior to c++.
Name any commonly (or uncommonly) used OS c++ can't be compiled for?
>>C++ also tends to be slower than java (scientifically proven) as >>monkeys tend to write code in c++ as opposed to humans >>writing code in java.
what monkeys are these? I've get to see a 3D rendering engine in Java that can even come close to a similar product in C++.
If your refering to something like
http://www.freewebs.com/godaves/javabench_revisited/
then there's many a rebuttle by something like http://kano.net/javabench/
I don't mean to come across as overbearing and if you prove me wrong then I shall accept it joyously. However your statements seem to fly in the face of my (somewhat limited) knowlege on the subject.
Name any commonly (or uncommonly) used OS c++ can't be compiled for?
>>C++ also tends to be slower than java (scientifically proven) as >>monkeys tend to write code in c++ as opposed to humans >>writing code in java.
what monkeys are these? I've get to see a 3D rendering engine in Java that can even come close to a similar product in C++.
If your refering to something like
http://www.freewebs.com/godaves/javabench_revisited/
then there's many a rebuttle by something like http://kano.net/javabench/
I don't mean to come across as overbearing and if you prove me wrong then I shall accept it joyously. However your statements seem to fly in the face of my (somewhat limited) knowlege on the subject.
code tags, there to give us line numbers and colours! [code] is bad, [code=C++] is good!
> Name any commonly (or uncommonly) used OS c++ can't be compiled for?
Windows xp, windows 2000, windows vista to name but a few as the number of virii generally prevents the OS from even starting up.
>what monkeys are these?
The ones that can swing from trees and eat bananas.
>and if you prove me wrong then I shall accept it joyously
I expect to see you wearing a big joyous grin on your face then.
Windows xp, windows 2000, windows vista to name but a few as the number of virii generally prevents the OS from even starting up.
>what monkeys are these?
The ones that can swing from trees and eat bananas.
>and if you prove me wrong then I shall accept it joyously
I expect to see you wearing a big joyous grin on your face then.
*Voted best profile in the world*
•
•
•
•
> Name any commonly (or uncommonly) used OS c++ can't be compiled for?
Windows xp, windows 2000, windows vista to name but a few as the number of virii generally prevents the OS from even starting up.
>what monkeys are these?
The ones that can swing from trees and eat bananas.
>and if you prove me wrong then I shall accept it joyously
I expect to see you wearing a big joyous grin on your face then.
As for the monkey statement, find me a video of a big furry monkey programming in c++ and successfully compiling and I'll get you a cookie the size of the big joyous grin I'll have for you.
I have to say your monkey statement did put a big grin on my face though :p.
Last edited by DarthPJB; May 29th, 2009 at 10:23 am. Reason: can't spell 'big'
code tags, there to give us line numbers and colours! [code] is bad, [code=C++] is good!
![]() |
Similar Threads
- FT Junior Java Developer Needed for Major Media firm in NYC (Software Development Job Offers)
- Java/J2EE Senior Software Engineer (Software Development Job Offers)
- Java Developer Required (Software Development Job Offers)
- Java Interview Question (Java)
- Random Java Info (Java)
- Java project (Java)
- Java vs Java3D (Java)
Other Threads in the C++ Forum
- Previous Thread: image in picture control not displayed properly after moving
- Next Thread: Pushing LPCWSTR string to vector scrambles result?
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion count data delete deploy desktop developer directshow dll download dynamic encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news node number output parameter pointer problem program programming project proxy python read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






