On Why Java Is 'c'ooler! - additions / criticisms invited

Pages: 1, 2
free web hosting
Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

On Why Java Is 'c'ooler! - additions / criticisms invited

saint
im basically a C++ programmer and into Java only now..and i seem to falling in love with it.
here are my thoughts on why i think Java seems cooler

i invite people to add on to the list, im sure there are great many things i have missed out..things im yet to be enlightened in Java!


1. no more of those wierd pointers!

this pointer thing always seemed to me something gone all wrong..something that lacked better conception.
thank god i dont have to use * and & alternatively to deal with one same thing. pointers in c and c++ were surely something that made a simple job tough. everyone of us felt it when we first learnt pointers and the feeling never goes away too.


2. no unnecessary bitfields probs!

if pointers seemed all wrong..this one seemed senseless! c'mon...no way can it be our prob to worry about wasted bits and pieces! it is the compiler's headache and it has to take care of it on its own. we have enough to worry about developing our programs.


3. world without multiple inheritence? and it seems smarter!


i agree i couldn't believe this one at first. all the reading and hearing about how C ++ gave a new dimension to OOP with multiple inheritance kept running at the back of my mind. and it took me a long time to actually accept it and understand the new way. but after having understood it...yes...interfacing seems smarter! this one is definitely the icing on the cake..im amazed how they pulled it off.


4. no "unsigned" problems!

wait a minute...did you ever have a negetive int as value for a variable?
another unnecessary piece of coding.


5. no 'global' problems!

oh what a horrid time we had getting variables and functions to work when you declare somewhere but need to use it again somewhere else and in order to reference it you had to look into those global and local declarations...were they all really worth the pain?


6. no overloading and underloading..lol!

use an appropriate method name instead...simple, sweet, cute and more importantly - meaningful.


7. no function pointers!

when pointers by themselves were ugly then what to call this.

use the smarter Reflection.

like:
CODE

Method method = Pet.class.getMethod("getFood", null);

// invoke getFood() on object "dog"

Object address = method.invoke(dog, null);


now a'int this simple and cool?


8. what was 'goto' doing in oop?

i never seemed to get it from the start...you branch off from C and develop C++ as a structured programming and incorporate 'goto'? good logic.


9. no comma operator

a..what? what for?


Java is Cool!

cheerz!

saint

 

 

 


Reply

Inspiron
I think, wait till you learn .NET, you will find it is cooler than Java. To me, Java is not a very easy programming language. Probably I am .NET trainned because .NET is really easy to program. No much complicated programming skills are need for .NET. In my school, I was taught .NET in the first 2 years. In the 3rd year, I was taught with a brand new programming platform, Java. I find it not easy to get the hang out of it. Java is really sensitive, in which the fact that Java is case-sensitive and more. .NET however issn't case sensitive. If it is, the IDE for .NET will automatically change to the correct case so the programmer can basically not bother about it.

I don't really like the use of extended classes in Java as it gets complicated when the program gets bigger. Sometimes a "null exception" happens for no reason. And this error basically halts the entire programming work. Sometimes I restarted the computer, the null exception error just go away. Weird, but it's true. Such disadvantages made me think bad about Java.

Of course on the other hand, Java is a free programming language that is used quite commonly now adays. However I believe once Windows Vista is launched, Java may be supported lessly on the Vista operating system. Vista will be fully a .NET compatible software. Since .NET is from Microsoft, we all have to pay a price for it, otherwise Java will be an alternative.

Pro and cons.. The programmer have to decide on preferences, compatibility and scalability.

 

 

 


Reply

Dumbledore
I'll agree to Saint. I think Java has really a lot of advantages about C++. One of the main problems of Java, the speed, is improving more and more an I think it won't take very long and ths speed problem is no problem any more.
But today one shouldn't compare Java to C++, it's better to compare it to C#. With the .NET environment there are a lot of advantages you didn't had with C++, like for example the pointer stuff which has been replaced by C#.

But generally I think Java is at present the best programming language to use! And I also think it's a good choice for beginners to start with, cause you can achieve first results relatively easy.

Greets, Chris

Reply

WindAndWater
I agree that java's generally designed to encourage good coding practices, which is great compared to c++. Its pre-written code libraries are also excellent. Having a pre-written and accurate API is wonderful. However, I'm worried that with the addition of garbage collection new programmers are going to have a very poor idea of memory management. Java automates a lot of the little things that you have to do in C++ manually -- which isn't necessarily bad. However, add in an IDE like Eclipse that practically writes a third of your code for you, and someone who learns Java first is never going to find C++ accessible.

Pointers are a but kludgy, but are absolutely essential to systems programming in C. I have not yet, and I hope never to see an OS written primarily in Java. ;-) The same goes for bit fields -- you could never write malloc in Java.

One other neat feature is its ability to support "native" code (meaning c++) to get around its own limitations.

Reply

Hiko Haieto
I would definitely go with Java, its got more power and compatibility than anything else. I couldnt help but notice a little noobishness about the difference between the languages themselves and an ide, and the null exception was prolly the ide as well. Also, Java will still be quite prominent when Vista comes in - Microsoft doesnt make their software on Java, instead Java makes their libraries on Windows. Oh yeah, and if you get a Java license you are actually entitled to modifying Java itself (add another point to the list - it does have applications).

Reply

windowpane
Even though this may be considered an old topic, I feel I have a few pennies worth of ideas.

QUOTE
1. no more of those wierd pointers!

this pointer thing always seemed to me something gone all wrong..something that lacked better conception.
thank god i dont have to use * and & alternatively to deal with one same thing. pointers in c and c++ were surely something that made a simple job tough. everyone of us felt it when we first learnt pointers and the feeling never goes away too.

If it is such a simple job don't use a pointer in the first place. Also, problems with pointers is is a problem of the coder not understanding. Pointers are crucial to so many things.

QUOTE
3. world without multiple inheritence? and it seems smarter!


i agree i couldn't believe this one at first. all the reading and hearing about how C ++ gave a new dimension to OOP with multiple inheritance kept running at the back of my mind. and it took me a long time to actually accept it and understand the new way. but after having understood it...yes...interfacing seems smarter! this one is definitely the icing on the cake..im amazed how they pulled it off.

If you aren't going to use multiple inheritance than don't use it. Having it allows flexibility. Think about other things in life, isn't it always better to have something even though you think you'll never use it, just in case.

QUOTE

6. no overloading and underloading..lol!

use an appropriate method name instead...simple, sweet, cute and more importantly - meaningful.

Once again, if you don't want to overload the function, then don't. Nothing in C++ keeps you from giving functions different names.

QUOTE

7. no function pointers!

when pointers by themselves were ugly then what to call this.


What is so hard about
CODE
int (*function)(int c);
? Also, for the third time, if you don't want to use it then don't.

QUOTE
8. what was 'goto' doing in oop?

i never seemed to get it from the start...you branch off from C and develop C++ as a structured programming and incorporate 'goto'? good logic.

Once again, for the fourth time, if you don't want to use it then don't (like almost every C++ programmer), it was probably kept to keep compatibility with some C stuff.

QUOTE
9. no comma operator

a..what? what for?


You're complaining about a comma, a simple comma, when in Java just do a simple little program, you have to do
CODE
public class Hello
{
     public static void main(String args[])
     {
         System.out.println("Hello World");
      }
}
as opposed to C++
CODE
#include <iostream>
int main()
{
    std::cout << "Hello World\n";
    return 0;
}
or Perl, one of the most powerful languages
CODE
#!/usr/bin/perl
print "Hello World\n";


Also, Hiko Haieto, I'm sorry but Java is nowhere close to being more powerful than anything else.

Also, speed is horrible. Using the unix time utility I timed a Hello World program written in Java and time output this:
real 0m0.305s
I've written much more complex programs in C or C++ and they never even go above 0m0.100s and rarely above 0m0.50s

I only agree with WindandWater, let us pray a operating system is never written in Java.

I leave with these articles: http://www.joelonsoftware.com/articles/The...avaSchools.html
http://www.paulgraham.com/javacover.html

Reply

masterio
QUOTE
I only agree with WindandWater, let us pray a operating system is never written in Java.


So do I. The only reason why I use java because in my college use it. Personnaly I really like C/C++. Java application's speed is very-very poor for critical application. Some example, I have JDK 1.5.07 we know java born in 1995 and it's eleven years old.

Why for eleven years old. I try to make program to show user save/open/etc dialog, it takes about 5-6 seconds to open!!! if we use our OS theme. Men...!, people who used will sleeped until the box open! laugh.gif

C/C++ is the best programming language that ever born!!

Reply

fffanatics
There are numerous things that are great about java and numerous things that are better in c++. Java for one is very portable and very OOP oriented. However, because of the JVM java also is slower than natively compiled C++ programs since machine code runs fast than a JVM that has to compile on the spot. Also, C++ is much better at numerical calculations than java.

As for no pointers in Java you could not be any more wrong. In Java, everything is a pointer and there are numerous ways you can use pointer arithmetic and other pointer operations that are very useful in C++ also in java.

Overall, you have to look at what you are going to do and then decide on a language. Just because you like one language better than another does not mean you should always use it. Use a language because the strengths that you are using out weight the negatives.

Reply

FLaKes
I dont know Java, at least yet. But there is one thing that is for sure that can be added to the why java is cooler list. It is that there is a high amount of job opportunities for it, I read it on this link:

http://www.eweek.com/article2/0,1759,20164...3119TX1K0000594

In it you can see it compared with 10 other languages, including .Net, and you can see that in that investigation it is numer one in job opportunities. So I think that makes it a lot cooler than the rest.

Reply

darran
I am not really that inclined in the technical aspect of Java but I have been programming for 3 years and I can safely say that it is my strongest programming language compared to other lanuages such as C++ and .NET Right now, I am doing Java Mobile applications to be ported on your mobile phone, and I believe Java will be the way to go when these things are concerned.

Just to correct the post by Saint (No Offence)

1. Pointers will always be there, it is crucial for any programming language. It may not be as complicating syntax-wise as C Programming, but it will always be there.

2. Multiple inheritance is allowed in Java. I don't see why you say that it is gone. For example, A person may inherit from a human and a human can inherit from a species. There may not be 2 instances of inheritances within a class but there can be multiple inheritances.

For some reason, I think Java being case sensitive is beneficial to us. .NET simply pamper us too much with their casing changes. With Java, we will learn to program in the right way with proper variable naming conventions and things such as that.

I second your post though, Java is cool! I love Java


Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. jcreator pre-written game - 24.94 hr back. (1)
Similar Topics

Keywords : java cooler additions criticisms invited

  1. Java Or C++ - (9)
    Many having tell me to make my MMORPG in java leads me to agree, But I'm not sure truly is it
    not yet easier, but yet the outcome of programming an MMORPG in java will make it fail or succeed
    more then one in C+= I've learned a lot of variables in javascript, and I don't think that
    java would be too bad either. My true question is, is those who use these languages, which seems
    to give better outcome, and which seems to be more in ease. Regards -PCessna...
  2. How To Create Java Button Or Frame - to be customized (14)
    hi to all!!!! just like to ask if it would be possible if i could make a custom
    button or frame in java. i got tired of using the build infeatures in java. i would like to create
    my own dessign of button or frame.. can it be possible!!! /biggrin.gif' border='0'
    style='vertical-align:middle' alt='biggrin.gif' /> thank!!!! /laugh.gif'
    border='0' style='vertical-align:middle' alt='laugh.gif' /> New Help In! is NOT a descriptive
    topic title. Next time you decide not to follow the posting rules, you will be issued a w...
  3. Java Mobile Applications - What you wanna have on your phone ? (7)
    I'm trying to do a Java mobile J2me application... But I don't know what to do... Any
    suggestions....? Maybe you guys can say what you would like to have on your mobile phone... ...
  4. Java And Xml: Links You Must Have - (1)
  5. Java Multithreading Issues - (2)
    So we have a web based application running on JBoss on several clustered servers. The front end of
    the application is using jms to communicate with the middleware MDB, which communicates with other
    backend application servers. The application runs well when only a few requests are submited.
    However, when requests boost to couple thousands, the app starts to crash. The log files shows a
    concurrency issue with the ThreadPoolExecutor. When we set the core size pool to one the issue was
    solved. Looks like we have concurrent issue of multiple threads accessing same resource s...
  6. How To Implement Single Instance Application On Java - (0)
    See the next few lines containing Java Code: CODE 1. // imports    2. import
    sun.management.ConnectorAddressLink;      3. import sun.jvmstat.monitor.HostIdentifier;      4.
    import sun.jvmstat.monitor.Monitor;      5. import sun.jvmstat.monitor.MonitoredHost;      6. import
    sun.jvmstat.monitor.MonitoredVm;      7. import sun.jvmstat.monitor.MonitoredVmUtil;      8. import
    sun.jvmstat.monitor.MonitorException;      9. import sun.jvmstat.monitor.VmIdentifier;     10.  
      11. public static void main(String args[]) {     12.         /* The method Managem...
  7. Call Pdf995 From Java - (0)
    How can i call pdf995 engine from Java to generate Pdf from Doc. This approach from Visual Basic
    Application is provided in http://www.pdf995.com/faq_dev.html . How can i approach same from Java?
    Can anyone help? ...
  8. Auto Run Java Program - Run Java program on double click (11)
    Some of the installables in java comes in form of .jar file, one has to just double click or type
    "java -jar file.jar", and it starts executing. The reason for this is a line appended in the
    MANIFEST.MF file of that jar file. For writing a similar jar file of your own, just write your java
    file, then compile the same and create a jar file. Create a MANIFEST.MF file and the content should
    have the followings: CODE Manifest-Version: 1.0 Created-By: xyz Main-Class:
    xyz.MainClass Here xyz.MainClass is the main class. Now create a jar file with the man...
  9. Java Game - (2)
    Hi, I'm interested in game creation on websites. The game should be playable via web browser.
    I'm not new in programing, I know C++, C# and OpenGL api. But I'm new on Java. So I have
    some questions I want to ask You: Will I'l be able to create simple 2d game with java which
    would be playable via web browser? Simple 2d game means: timers, images, animated sprites, in game
    font. Will I'l be able to use OpenGL? Or I should use something different? Does Trap17 suports
    java graphics features I want? Thank You for Your time and answers....
  10. Java Object[][] Help - (2)
    I'm having some issues with working with objects . I get an index out of bounds ex.
    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 heres how
    I'm using it ---------------------------- Object contestants = new Object {}; contestants
    = "test"; any ideas appreciated. Do I need to specify the initial size on creation or something?
    It seems I answered my own question I gave it an inital size then I was able to add things. But is
    there a way I can add to it on the fly without knowing its require maximum size?...
  11. Java Vs Javascript - (11)
    I thought they were completely different things. Surely javascript should be seperated from the rest...
  12. Learn Java Programming Language Online Step By Step - (0)
    I had found this site >> http://learnjava.awardspace.com This website is for people who want
    to learn Java Programming Language step by step. This website also includes JAVA lessons from the
    beginning to advanced level. So this site appropriates for the beginner of Java programmer language
    or non-basic Java Programming Language. The lessons are easy to follow and understand starting
    from how to get your PC JAVA ready, the fundamental programming concept and creating the real
    application. Moreover, the working examples are also included. Please enjoy the les...
  13. Java Script Drop Down Menu With Css - - a full code for a dynamic drop down (2)
    Introduction This is a code that I use to dynamically create the drop down menus. First, you have
    to edit the following code and put it in your Javascript. Notice : /*** SET BUTTON'S FOLDER HERE
    ***/. Edit that to your folder. Also, the /*** SET BUTTONS' FILENAMES HERE ***/. This creates a
    mouseover when the drop down is activated. Put all your onmouseover images under: oversources = new
    array; and your onmouseout images under : upsources. Be sure to set your on and out images above
    each other. CODE /*** SET BUTTON'S FOLDER HERE ***/ var buttonFold...
  14. [help] Java Script: Window.open - Works with Firefox, not IE (8)
    CODE <HEAD> var popUpWin=0; function popUpWindow(URLStr) {
     if(popUpWin)  {    if(!popUpWin.closed) popUpWin.close();  }
     popUpWin = open(URLStr, 'GunBound Tactics: Screenshots',
    'width=820,height=550,menubar=no,resizable=yes,scrollbars=yes,toolbar=no,top=90,left=90')
    ;; } </HEAD> <BODY> <a
    href="javascript:popUpWindow('/f11/clipped.php');"><b>Clips&
    #60;/b></a> This is a script for opening a new window. It works ...
  15. The Power Of Java - the best application that shows java features (14)
    Java technology has various usage from mobile applications to Enterprise applications. I think the
    power of Java technology in web applications and applets is showed in "meez.com" where u can create
    your own 3d avatars. /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:" border="0"
    alt="rolleyes.gif" />...
  16. Jsp Or Java Chat Script Like Mig33 - (4)
    so most of you guys know mig33. its a wap application,probaly java.most kindly to be java. does
    anyone have java knowlege or knows where i can get a chat script like mig33? i also know this server
    supports jsp so im planing to use it for my application. i was hosted here last year but moved
    because i found a better host. now im back just to use the jsp on this server. Im planing to run
    chat applictions so if any one wants to help me in my project let me know....
  17. Java Helpdesk - All your queries regarding Java Programming goes here. (8)
    Hellow friends, I am creating this thread for all queries and suggestions related to java coding. If
    you face any problem, post it here, and others who have a solution can post the reply here. Hope it
    helps the users....
  18. Java Applet Query - (1)
    Hey there, I have made an applet that shows images moving about the screen. I have pause/resume
    buttons that work. But i've noticed that when the applet is interuppted by something i.e moving
    another window over it, it will automatically repaint. My question is how can I stop this? How can
    I make it so that the only time that paint is called is when I want it to be called? Thanks in
    advance!...
  19. Java Basic Program Guidance - (6)
    aving some problems taking in the Java at Uni, Was wondering if anyone could shine some light on it
    for me. My task is to write a program that will ask you to enter 2 words. the program will then
    print out both words on one line. However the words will be seperated by dots that will make the
    total length of the line 40. so if your first word was turtle and the second was abc, the output
    would be turtle...............................abc The program should check for certain conditions:
    1. a word can not be longer than 37 characters; 2. there must always be atlest 2 do...
  20. Circular Movment/animation In Java? - (6)
    Hey there guys! How would i go about making an object move about a fixed point for a java
    applet? Thanks in advance guys! Regards, Rod...
  21. Beginning Java - where to start (10)
    does anyone know of any good websites with free java tutorials for people without a lot of prior
    coding experience? i've read some tutorials, but every one i read starts making references to C
    and C++... well i don't know either of those so it gets really really confusing really really
    fast. ive downloaded the sdk but that is it.... i know a pretty good amount of php and a tiny bit of
    perl but those are procedural languages so i dont know if they even helpe me at all with an OOP
    language like java....
  22. Java Iterator Help - I need help with a method using iterator (2)
    /** * Remove from the club's collection all members who * joined in the given month,
    and return them stored * in a sparate collection object. * @param month The month of the
    membership. * @param year The year of the membership. * @return The number of members.
    */ public ArrayList purge(int month, int year) { if(month >= 1 && month
    { Iterator it = members.iterator(); ArrayList purged;
    purged = new ArrayList(); int counter = 0; wh...
  23. Problem With Java Script Popup Form - Doesnt work in Safari (1)
    This code wont work in Safari, but works fine in Firefox 2. Can someone help. The error pops up
    however. It just doesn't do anything unless you dont pick one and then it says Pick a Windows
    tweak, but if you DO pick one it doesnt even try to load anything. Everything you see below is
    everything inside my PHP Include. If you would like to view my actual site it's
    http://boozkerstweaks.trap17.com There might be PHP errors and stuff right now, but i am working on
    those, but this i can not get. CODE <td  valign="top" class="right">
       ...
  24. Java editor - (72)
    In your opinion what's the best java editor/compiler? i use jcreator le and it works nicely......
  25. Helpful Registry Edit For Java Programmers - Command Prompt on right click menu (2)
    With this registry edit you can easily open the current folder in prompt without going through any
    Change Directory commands (cd). This is useful for people like me who are programming in JAVA, and
    every time to create class files and test them I have a diificult time just entering the commands in
    Prompt. But if you don't want to use this registry edit you can create the directory in
    C:\ drive like C:\files so you have to navigate very little in prompt. If you are
    experienced in regedit you can do it yourself shown below OR download the attachment and app...
  26. Java In A High School Software Design Course - Is it good? (5)
    Hi, I'm doing a course called Software Design and Development for HSC in a high school in
    Australia. HSC is basically the courses you do that you get assessed on for University entrance. I
    haven't really done programming before, although I've seen source code and can decipher it
    and make small changes. I am also quite good with the general use of computers. One of the major
    projects we will do in the course is the making of a game (although it's not just game-making
    that we do. We also have to develop a software solution package, although I'm not su...
  27. Java Part 1 - (2)
    The HTML <script> tag is used to insert a JavaScript into an HTML page. Examples Write text
    with Javascript - http://www.w3schools.com/js/tryit.asp?filename=tryjs_text The example
    demonstrates how to use JavaScript to write text on a web page. Write HTML with Javascript -
    http://www.w3schools.com/js/tryit.asp?file...ryjs_formattext The example demonstrates how to use
    JavaScript to write HTML tags on a web page. How to Put a JavaScript Into an HTML Page CODE
    <html> <body> [color=red]<script type="text/javascript"...
  28. Java Exercise Help - I need help to understand this question (2)
    Ok at my Uni they teach you OOP with java, They used to do with C++ i believe but swiched to java
    because its easier to teach people OOP with java apparently. Anyway I've been working on some
    exercises with java (book is 'objects first with java'). I've got this one exercise
    which I cant understand. QUOTE Exercise 4.29 Rewrite getLot so that it does not rely on a
    lot with a particular number being stored at index (number - 1) in the collection. For instance,
    if lot number 2 has been removed, then lot number 3 will have been moved from index 2 ...
  29. Which Is The Best Java Web Framework? - JSF, Spring MVC, Stripes, Struts 2, Tapestry and Wicket (0)
    JSF Pros: Java EE Standard - lots of demand and jobs Fast and easy to develop with
    initially Lots of component libraries Cons: Tag soup for JSPs Doesn't play well with REST
    or Security No single source for implementation Spring MVC Pros: Lifecyle for
    overriding binding, validation, etc. Integrates with many view options seamlessly: JSP/JSTL, Tiles,
    Velocity, FreeMarker, Excel, PDF Inversion of Control makes it easy to test Cons: Configuration
    intensive - lots of XML Almost too flexible - no common parent Controller No built-in Aja...
  30. Help Deploying Java - (0)
    Hi i just registered to this site. can any1 tell me how to deploy a java app here? i use weblogic
    server on my local machine. thanks Abhishek....



Looking for java, cooler, additions, criticisms, invited

Searching Video's for java, cooler, additions, criticisms, invited
advertisement



On Why Java Is 'c'ooler! - additions / criticisms invited



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE