Archived

This topic is now archived and is closed to further replies.

Stranger

About Java.

Recommended Posts

I want to know whether Java is easier to learn and easier to build a 3D Engine than C++.I dont care about speed I just want to now if it is easier and if you can make the same things with Java as with C++.Comparing the code,can we support that a program made with Java needs less lines of code than with C++?

Share this post


Link to post
Share on other sites
quote:
Original post by Stranger
I want to know whether Java is easier to learn and easier to build a 3D Engine than C++.

That''s a loaded question. As a generalism, languages that are easy to learn are simpler. If a language is simpler, its expressive range is narrower which, in turn, makes it harder to express complicated problems. This leads to the paradox that simpler languages can be harder to use, depending on the problem. C++ is harder to learn than Java, but has greater expressivity. Take yer pick.
quote:

Comparing the code,can we support that a program made with Java needs less lines of code than with C++?

Its not particularly easy to support such an assertion in either direction as its always possible to write more lines of code than are needed. To combat that condition, you should study diligently to understand your chosen language well.

Share this post


Link to post
Share on other sites
C++ is easier, in my opinion.
You can use objects as much as you want, but you can also use procedural code when it''s easiest, and (as I''ve seen it) this is what people learning C++ naturally tend to do. They create and use objects, then manipulate the objects inside sections of procedural code. - It''s been said that all-OO is easier to learn, but I haven''t ever seen actual evidence of it in the real world.
-------
As for using less lines of code, if you use Java3D, then it''s going to require less lines because it will include a bunch of functions for you that straight C++ doesn''t. The comparable way to go for C++ would be to use DirectX or OpenGL, but one would have to understand programming well enough to do that.
....
If you just want something to make & look at that you did yourself, then write it all yourself.
~

Share this post


Link to post
Share on other sites
Java is all about OO. Sometimes people new to programming have trouble with this.

C++ uses pointers and you have to manage all of your memory. Sometimes people new to programming have trouble with this.

I would suspect that Java may be a bit easier to learn.

The Tyr project is here.

Share this post


Link to post
Share on other sites
Although I use C++ every day at work I would recommend Java for beginners any day. C++ can do a lot of neat (and complicated) stuff that beginners shouldn''t have to worry about. I say: go for Java.



Jacob Marner, M.Sc.
Console Programmer, Deadline Games

Share this post


Link to post
Share on other sites
With regards to "less lines of code" it all depends on what you are doing and what libraries you''re using. I can say that the official tutorial for Java3D is really quite good though if you''re new to 3d stuff (as long as you''re comfortable with OO).

Share this post


Link to post
Share on other sites
quote:
Original post by felonius
C++ can do a lot of neat (and complicated) stuff that beginners shouldn''t have to worry about.

Then they shouldn''t have to worry about them in C++ either. There seems to be a perception of C++ that one has to learn all the ''macho'' low-level features before being allowed to program anything. Its not true.

Share this post


Link to post
Share on other sites
Further: C++ runs faster than Java, and Speed is Good. Especially when you''re wanting to toss around 3-D models. -Were any computers with Java chips ever made?
.....
quote:
Although I use C++ every day at work I would recommend Java for beginners any day. C++ can do a lot of neat (and complicated) stuff that beginners shouldn''t have to worry about. I say: go for Java. ~ Jacob Marner, M.Sc., Console Programmer, Deadline Games

~~~~~~~~~~?
This I find intresting: I''m not employed in the game industry, but as I have read it, one of the reasons C++ is preferred over Java is that C++ OO rules can be violated when advantageous. Why recommend something you don''t use as opposed to something that you do?
~

Share this post


Link to post
Share on other sites
Lubb; I believe some of the new mobile phones have hardware (ie not an interpreter) to run Java - well okay; it''s not a complete computer but will it do?

Share this post


Link to post
Share on other sites
You can play Doom.



Faith. n. Belief without evidence in what is told by one who speaks without knowledge, of things without parallel. -- Ambrose Bierce

Share this post


Link to post
Share on other sites
>>I want to know whether Java is easier to learn and easier to build a 3D Engine than C++.I dont care about speed I just want to now if it is easier<<

depends on the person, personally i find them about of equal complexity (though if u get into advanced c++ stuff then c++ is more difficult)

>>and if you can make the same things with Java as with C++.<<

yes u can do the same things with java as u can do with c++

>>Comparing the code,can we support that a program made with Java needs less lines of code than with C++?<<

http://www.bagley.org/~doug/shootout/craps.shtml?xcpu=0&xmem=0&xloc=1&ackermann=1&ary3=3&wc=3&echo=5&except=1&fibo=2&hash=1&hash2=4&heapsort=4&hello=1&lists=3&matrix=3&methcall=5&nestedloop=4&objinst=5&prodcons=1&random=3®exmatch=4&reversefile=4&sieve=4&spellcheck=4&moments=2&strcat=2&sumcol=3&wordfreq=5

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
quote:
Original post by Stranger
I want to know whether Java is easier to learn and easier to build a 3D Engine than C++.I dont care about speed I just want to now if it is easier and if you can make the same things with Java as with C++.Comparing the code,can we support that a program made with Java needs less lines of code than with C++?


I''ve found the Java code to be some what bloated, just look at the way your forced to declare arrays.

Share this post


Link to post
Share on other sites
err you mean like :

int[] fiveInts = new int[5]; ?

or this :

int[] fiveInts = { 5 , 10 , 15 , 20 , 25 }; ?

What does non-bloated array code look like?

Share this post


Link to post
Share on other sites