Author Topic: Java Vs C++  (Read 9509 times)

0 Members and 1 Guest are viewing this topic.

Offline gamingstill

  • Member
  • Jr. Member
  • *
  • Points: 5
  • Posts: 99
    • View Profile
Java Vs C++
« Reply #15 on: December 23, 2010, 01:09:37 am »
Quote from: techmaniac on December 22, 2010, 09:52:24 pm
razor said it right
 
compilers need for every language but java doesnt convert it in to executable file rather it converts code in to bytecode and then jvm used to interpretate it in human readable form and any machine which have this JVM can interpretate this bytecode.
 
but In c++,exe files created which doenst run on many platform.
 
and java mainly use in Mobile applications and currently using in Android Applications.
 


its not at all hard to port your code to other platforms from M$.
Q6600@CM hyper 212+|Abit Ip35P| 6 gb ddr 2 800 mhz|Amd Radeon 5770|WD BE 1x1 tb + 1x 2 TB(seagate)| Razer DeathAdder|CoolerMaster 690|Corsair VX550|Dell U2311H| 160 gb external,4x 8 gb,2 x 4gb,1x 16 gb PD| 6x1 gb,2x 4gb,1x8 gb,1x16 gb microSD| Creative T6610|JVC marshallow,JVC HA-RX700,HiFiman RE-ZERO|Sansa fuze 8 gb|Notion Ink Adam 3G LCD|IPAD 2 64 gb 3G,ASUS N-13|XBOX 360 controller| APC 650 VA|Canon Pixma|| sempron @3.6 ghz|3 gb ddr 3|asus mobo|radeon 5470||Heuwei UMG 1831|Panasonic FZ-35|Nikon L11  :gunfr

Offline gamingstill

  • Member
  • Jr. Member
  • *
  • Points: 5
  • Posts: 99
    • View Profile
Java Vs C++
« Reply #16 on: December 23, 2010, 01:10:08 am »
Quote from: xanezu on December 22, 2010, 10:04:52 pm
C++ is a powerful language designed for system programming. The Java
language was designed to be simple and easy to learn with a powerful
cross-platform library. The Java standard library
 is considerably large for a standard library. However, Java does not
always provide full access to the features and performance of the
platform on which the software runs. The C++ standard libraries are
simple and robust providing containers and associative arrays

Source-wikipedia

The only conclusion is that c++ is the best :rtfr




+1.
« Last Edit: December 23, 2010, 01:11:25 am by gamingstill »
Q6600@CM hyper 212+|Abit Ip35P| 6 gb ddr 2 800 mhz|Amd Radeon 5770|WD BE 1x1 tb + 1x 2 TB(seagate)| Razer DeathAdder|CoolerMaster 690|Corsair VX550|Dell U2311H| 160 gb external,4x 8 gb,2 x 4gb,1x 16 gb PD| 6x1 gb,2x 4gb,1x8 gb,1x16 gb microSD| Creative T6610|JVC marshallow,JVC HA-RX700,HiFiman RE-ZERO|Sansa fuze 8 gb|Notion Ink Adam 3G LCD|IPAD 2 64 gb 3G,ASUS N-13|XBOX 360 controller| APC 650 VA|Canon Pixma|| sempron @3.6 ghz|3 gb ddr 3|asus mobo|radeon 5470||Heuwei UMG 1831|Panasonic FZ-35|Nikon L11  :gunfr

Offline techmaniac

  • kar bhla to ho bhla
  • Alumni
  • Techbits Elite Member
  • *
  • Points: 340
  • Posts: 2845
  • kar bhla to ho bhla
    • _
      Not Specified
    • View Profile
Java Vs C++
« Reply #17 on: December 23, 2010, 12:03:06 pm »
Quote from: gamingstill on December 23, 2010, 01:10:08 am
Quote from: xanezu on December 22, 2010, 10:04:52 pm
C++ is a powerful language designed for system programming. The Java
language was designed to be simple and easy to learn with a powerful
cross-platform library. The Java standard library
is considerably large for a standard library. However, Java does not
always provide full access to the features and performance of the
platform on which the software runs. The C++ standard libraries are
simple and robust providing containers and associative arrays

Source-wikipedia

The only conclusion is that c++ is the best :rtfr


+1.

 
Gaming Still be regular on the forum and i think +1 on xanezu post is for last line only :P
« Last Edit: December 23, 2010, 12:03:40 pm by techmaniac »

Offline Durgesh Chauhan

  • Alumni
  • Super Member
  • *
  • Points: 484
  • Posts: 1630
    • _
      ECE
    • View Profile
Java Vs C++
« Reply #18 on: December 23, 2010, 12:16:44 pm »
C++ Vs Java is like
Daddy vs Son (jo thoda bada ho gya hai)

but in the end baap to baap hi hai :xd:
Durgesh Chauhan
(ALUMNI MAIT)
 

Offline gamingstill

  • Member
  • Jr. Member
  • *
  • Points: 5
  • Posts: 99
    • View Profile
Java Vs C++
« Reply #19 on: December 23, 2010, 12:27:30 pm »
Quote from: techmaniac on December 23, 2010, 12:03:06 pm
Quote from: gamingstill on December 23, 2010, 01:10:08 am
Quote from: xanezu on December 22, 2010, 10:04:52 pm
C++ is a powerful language designed for system programming. The Java
language was designed to be simple and easy to learn with a powerful
cross-platform library. The Java standard library
is considerably large for a standard library. However, Java does not
always provide full access to the features and performance of the
platform on which the software runs. The C++ standard libraries are
simple and robust providing containers and associative arrays

Source-wikipedia

The only conclusion is that c++ is the best :rtfr


+1.

 
Gaming Still be regular on the forum and i think +1 on xanezu post is for last line only :P


no time dude.....
Busy Life :P
Q6600@CM hyper 212+|Abit Ip35P| 6 gb ddr 2 800 mhz|Amd Radeon 5770|WD BE 1x1 tb + 1x 2 TB(seagate)| Razer DeathAdder|CoolerMaster 690|Corsair VX550|Dell U2311H| 160 gb external,4x 8 gb,2 x 4gb,1x 16 gb PD| 6x1 gb,2x 4gb,1x8 gb,1x16 gb microSD| Creative T6610|JVC marshallow,JVC HA-RX700,HiFiman RE-ZERO|Sansa fuze 8 gb|Notion Ink Adam 3G LCD|IPAD 2 64 gb 3G,ASUS N-13|XBOX 360 controller| APC 650 VA|Canon Pixma|| sempron @3.6 ghz|3 gb ddr 3|asus mobo|radeon 5470||Heuwei UMG 1831|Panasonic FZ-35|Nikon L11  :gunfr

Offline techmaniac

  • kar bhla to ho bhla
  • Alumni
  • Techbits Elite Member
  • *
  • Points: 340
  • Posts: 2845
  • kar bhla to ho bhla
    • _
      Not Specified
    • View Profile
Java Vs C++
« Reply #20 on: December 23, 2010, 12:49:51 pm »
now i think only sagrma sir words r left...:)
 
 
at the end conclusion is
1...c++ is meant for core programmer
2...java is meant for  noob programmer
 
I dont like Both...I like C#
 
but i think java is the future and remains because  companies r not supporting c++.
 

Offline Durgesh Chauhan

  • Alumni
  • Super Member
  • *
  • Points: 484
  • Posts: 1630
    • _
      ECE
    • View Profile
Java Vs C++
« Reply #21 on: December 23, 2010, 01:08:13 pm »
the major reason of liking c++ over java is that
3rd sem me c++ ki wajh se hi ache marks aaye the
Durgesh Chauhan
(ALUMNI MAIT)
 

Offline JIJA-JI

  • Banned
  • Techbits Elite Member
  • *
  • Points: 54
  • Posts: 2358

    • BPIT
    • _
      Not Specified
    • View Profile
Java Vs C++
« Reply #22 on: December 23, 2010, 01:37:37 pm »
    Java vs. C++ Performance:.................


    * Although Java does ok in a few low-level benchmarks, in large object-oriented programs C++ always wins.

      By saying "a few low-level benchmarks" the implication is that there is some body of other benchmarks that is not being discussed.

      In fact the paper surveys most or all of the benchmarks available. The cited benchmarks 1 and 2 are to my knowledge the only ones in existence that use real algorithms as opposed to invented (and questionable) microbenchmarks. All of the currently available multi-algorithm benchmarks, whether real algorithms (1,2) or microbenchmarks (3-5) give similar results.

      There are no collections of benchmarks of "large object-oriented programs" available in both C++ and Java versions, and almost certainly there never will be, so this statement is speculation.

      Some isolated "real" programs have been translated from C++ to Java, e.g. FreeTTS; in this and the other case I'm aware of the performance of the Java version is said to be better than the original.

    I have this single low-level benchmark in which C++ blows away Java

      It's easy to find short programs for which C++ beats Java, and other short programs for which Java beats C++, just as there are programs for which one C++ compiler does much better than another.

      To be a meaningful language comparison you should report several real algorithms, if possible, running on several problem sizes, and use several compilers. See the Cache/Memory effects section of the paper for why running on different problem sizes is important. The "almabench" benchmark referenced as [3] in the paper is a good example of a poor benchmark in this regard -- the trig library change from jdk1.3 to 1.4 affected the benchmark by a factor of two... meaning that this benchmark is mostly testing trig functions, and not telling us much about the languages in general.

    Template meta-programming allows C++ to blow away Java!

      Actually I've seen people use C++ templates in ways that make me agree that C++ can be elegant and expressive. C++ without templates... I used it for years, but in retrospect it seemed like slowly building Frankenstein's monster, over and over.

      Java has at least two good compile-time programming systems, see JSE for one. Also jdk1.5 has a new template system, though I have not used it and suspect it is not as powerful as JSE (JSE is some of what we once had in Lisp, though with none of the convenience).
   
       C++ blows away Java when ...

      Ok, I need to vary my phrases here. The remarks are all real comments that have been sent to me multiple times, but I'm paraphrasing.

      Concerning this repeated "blowing away": what are we talking about? A 20% speed difference? That's the speed difference you could get if you switch from one C++ compiler to another. A 50% difference? That's well within the overhead of using something like STL in some cases (see table in the paper). You shouldn't be using C++ if that's important to you.

   

Offline RzR1911

  • Alive.. Online
  • Alumni
  • Super Member
  • *
  • Points: 475
  • Posts: 1562
  • Alive.. Online
    • _
      Not Specified
    • View Profile
Java Vs C++
« Reply #23 on: December 23, 2010, 01:49:26 pm »
wow.. wikipedia.. looks like we're never gonna get this..

Quote/Ask Question

   A
 20% speed difference? That's the speed difference you could get if you
switch from one C++ compiler to another. A 50% difference? That's well
within the overhead of using something like STL in some cases. You shouldn't be using C++ if that's important to you.



this statement is quite awkward, java is platform independent i.e its performance doesn't depends upon the OS or hardware config, sirf ek machine chahiye jisme java compiler ho.. So where actually the compiling is done in case of java..?? cache memory..??  how speed varies upto 50%...??
if i am not wrong, STL is standard template library and templates can make a program to run faster as a template is so designed that it allows a user to do generic programming.. so in this case, execution will be faster.. how come a difference of 50% arouse..??


Offline JIJA-JI

  • Banned
  • Techbits Elite Member
  • *
  • Points: 54
  • Posts: 2358

    • BPIT
    • _
      Not Specified
    • View Profile
Java Vs C++
« Reply #24 on: December 23, 2010, 02:07:47 pm »
   JAVA VS C++............
     

    Java is both very similar to and very different    from C++.

    Both are object-oriented languages.

    The syntax is very similar - for instance, you already know the syntax for assignments (=), logical equality (==), for loops, while loops, function headers, declarations, creating a class, writing a constructor, calling a member function, ...

    Of course, much of the terminology is different, even when the concepts are the same.

    Some of the major differences between Java and C++ are:

         1. In Java, everything is a class. There are no stand-alone functions. Even main() is a member function! (BTW - in Java a member function is always called a method.)

         2. In Java, everything is a reference, so the programmer must make sure that memory is allocated properly (using new!), but does not explicitly de-allocate memory. This is usually very weird for most C++ programmers, but you will get used to it.

         3. In Java, parameters are pass-by-reference, so a method can change any object that is passed to it. (In other words - be careful!)

         4. Java has built-in graphics capabilities, while in C++ the graphics parts of an application are vendor-specific.

         5. Java can be used to write both stand-alone programs (applications) and programs that can be run over the Internet by a Browser (Applets).

         6. Java is still a relatively new language (1995) compared to C++ (1972 for C, 1985 for C++).
« Last Edit: December 23, 2010, 02:10:37 pm by JIJA-JI »

Offline ismail1

  • Member
  • Newbie
  • *
  • Points: 0
  • Posts: 1
    • View Profile
Java Vs C++
« Reply #25 on: March 09, 2011, 05:55:13 pm »

C++:

1.
Compatible with C source code, except for a few corner cases.
2.
Only provides object types and type names.
3.
Supports native unsigned arithmeti
4.
Supports the goto statement.

Java:

1.
No backward compatibility with any previous language. The syntax is however strongly influenced by C/C++.
2.
Is reflective, allowing metaprogramming and dynamic code generation at runtime.
3.
No native support for unsigned arithmetic.
4.
Supports labels with loops and statement blocks.
« Last Edit: March 09, 2011, 06:00:41 pm by ismail1 »

Offline cynusalisa

  • Banned
  • Newbie
  • *
  • Points: 0
  • Posts: 12
    • View Profile
    • http://ggi.ac.in/
Java Vs C++
« Reply #26 on: February 16, 2012, 02:23:59 pm »
It is more difficult to make difference between Java and C++.......As per mine views Both these languages are too good and Helpful for programming.........Both these languages have their own features and You guys should learn both these languages if you are in It Sector.........

_________________

First B.Tech institute in Punjab, take admision in it & grow your future with GGI...
**** NO ADVERTISEMENTS ****

 

How to Configure Java SDK With Widows and Text Pad

Started by rudeman

Replies: 0
Views: 1241
Last post August 04, 2012, 04:46:33 pm
by rudeman
html, css ,java scripts??

Started by vitz

Replies: 5
Views: 2060
Last post December 11, 2014, 06:11:11 am
by kurosaki
regarding java programming

Started by Ratika

Replies: 4
Views: 2726
Last post May 14, 2015, 07:17:38 pm
by sagrma
how to learn java

Started by computer

Replies: 3
Views: 2604
Last post January 04, 2016, 07:27:28 am
by Piyush
Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49