Sponsored Content
Full Discussion: Choosing Java or C++
Top Forums Programming Choosing Java or C++ Post 36982 by SolidSnake on Monday 9th of June 2003 11:27:25 AM
Old 06-09-2003
Reply to your reply

Firstly, let me assure you that Java is more flexible than C++ concerning your points. You can have multiple inheritance by the use of interfaces, inner classes and abstract classes.

You must also know that a deadly diamond of death is better handled in Java than C++(In C++ you use function calls whereas in Java you use inherited interfaces). Thus, you dont interfere with the object-oriented model.

Also, know that in the following months the new java version will include a more wide version of the C++ templates, generics with which you can have templates. Moreover, you must understand that the game of which language is faster is being heard before.

But know that, you can have Java-code even faster than C++ using static blocks of code and a very fast JVM like hotSpot. Of course, in certain cases only. As i said C++ is only in 30% o.o..

Furthermore, know that Java has about more than 5000 classes enriching its very professional application environment whereas C++ hasnt got any standard libraries except from io streams and stl.

Lastly when you say that java badly supports other languages i dont know if you tried JNI(Java Native Interface) or not. You can have JNI-code using C++ or C function calls or even inside a C++ funtion to have a construction of a JVM use java code and then destroy it.

Know also, that all the scripting languages(and i mean all!!!) can be simulated in java native code.

At the end, i dont understand your last question. If you mean what i use for programming then let me tell you that i use both languages in both unix and microsoft applications.


LET ME ASSURE YOU i dont try to compare the two languages. That would be irresponsible from my part since both languages are used where they better fit. I just try to answer your questions.

Im really interested in your reply!!!Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help in choosing Unix Platform.

I'm a completely noob to Unix. I have previously managed quite well Windows OS's but never Unix. -My question is quite simple: I've been investigating what's the easiest and most complex Unix OS. However, it seems there are quite a couple of OS's from which to choose, like: -Darwin ... (3 Replies)
Discussion started by: justanoob
3 Replies

2. UNIX for Dummies Questions & Answers

Choosing a version

I know that the rules say no school questions but I am in advanced topics and am going to go to college for programming and I want to find a easy first OS to start me out, please help, thanks (3 Replies)
Discussion started by: KoKo
3 Replies

3. UNIX for Dummies Questions & Answers

I need help choosing a linux.

There are soo many flavors of linux and i just cant choose/find the right linux for me... I am hopeing for a linux that is a Workhorse Can fit of a seires (or 1) disk(s) Lots of features (admin/mod features) A learning mode or a detailed tutorial Can work side by side with windows... (12 Replies)
Discussion started by: lithuaniaakid
12 Replies

4. Linux

Choosing the best distro.

Hi all Help me find the best distro for the following configurations: Intel pentium IV 1.6 Ghz 128 MB RAM :( 40 GB Hardisk with one very big partition more than 35 gb n another 2 gb partition. windows xp is already installed but has enough free space (26gb). Which linux will be... (0 Replies)
Discussion started by: bbala
0 Replies

5. Slackware

Help for choosing Slackware

Dear Friends, If I use Slackware for learning whether it will make any confusion in administering/using Redhat and SuSE since I have checked slackware is more like BSD. Thank you. (4 Replies)
Discussion started by: Tlogine
4 Replies

6. Cybersecurity

Choosing the right distro, Locked down from within.

I'm looking to put a box at a client site which will be connected to the client's home router for internet. That box will have remote access software on it and will have untrustworthy contractors logging in and using the browser. So, I'm looking for a distro that would be LOCKED DOWN to the max... (1 Reply)
Discussion started by: artranc3
1 Replies

7. Shell Programming and Scripting

Dynamically choosing the interpreter

Hi, Is it possible to choose the inerpreter conditionally. For example, if whereis bash returns /usr/bin/bash then i need to choose #!/usr/bin/bash else i need to use #!/usr/bin/sh. Is it possible to achieve in a shell script? Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

8. Red Hat

Choosing best location for authorized_keys!

Hello Friends, I am trying to troubleshoot one scenario for the customer. In their server configuration, each vhost has it's own user. The option is to shell access chrooted. The question is where would be the best place to store the authorized_keys file so that we can ssh in from the... (0 Replies)
Discussion started by: user3528
0 Replies

9. Linux

Choosing a UNIX

i have a project in numerical calculus in c language what unix i get better for this? (7 Replies)
Discussion started by: gitac
7 Replies

10. Linux

Help choosing distro

Hi, I just ordered an Skylake NUC and will run Linux on it. My distro of choice has been Ubuntu but I am fed up with the release cycle and would like more of a rolling release. I would say I am an intermediate level Linux user. It's going to be a HTPC, I want to have the latest kernels... (0 Replies)
Discussion started by: rthorntn
0 Replies
guake(1)						      General Commands Manual							  guake(1)

NAME
giws -- Generate C++ class wrappers to call Java methods/objects SYNOPSIS
giws [-hf, --description-file] [-o, --output-dir] [-p, --per-package] [-e, --throws-exception-on-error] [--header-extension-file] [--body- extension-file] [-v, --version] [-h, --help] DESCRIPTION
Giws is basically doing the same stuff as SWIG but the opposite. Calling Java from C/C++ can be tricky: JNI calls are complicated especially when dealing with non primivite types or arrays, performance issues must be kept in mind all the time, the code can be redundant (checking exceptions, checking returns of operations...). Giws hides this complexity through a C++ class which wraps the Java class. OPTIONS
-f, --description-file Description of the method of the Java Object. -o, --output-dir The directory where to export files -p, --per-package Generates CXX/HXX files per package -e, --throws-exception-on-error Throws a C++ exception instead of an exit(EXIT_FAILURE) --header-extension-file Specify the extension of the header file generated [Default : .hxx] --body-extension-file Specify the extension of the body file generated [Default : .cpp] -v --version Display the version information -h --help Display the help AUTHOR
giws was written by Sylvestre Ledru, Vincent Couvert and Jean-Baptiste Silvy This manual page was written by Sylvestre Ledru <sylvestre.ledru@inria.fr>, for the Debian project (but may be used by others). guake(1)
All times are GMT -4. The time now is 11:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy