About Java.

Started by
12 comments, last by Stranger 21 years, 6 months ago
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++?
Advertisement
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.
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.
~
RPD=Role-Playing-Dialogue. It's not a game,it never was. Deal with it.
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.
The Tyr project is here.
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
Jacob Marner, M.Sc.Console Programmer, Deadline Games
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).
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.
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?
~
RPD=Role-Playing-Dialogue. It's not a game,it never was. Deal with it.
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?

That depends, can I play Unreal Tournament on a cell phone yet?
RPD=Role-Playing-Dialogue. It's not a game,it never was. Deal with it.

This topic is closed to new replies.

Advertisement