Results 1 to 5 of 5

Thread: Java?

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Java?

    Half the jobs I apply for require that you have knowledge of Java. So I've finally decided that maybe I should get some. Where do I start? In fact, what is Java? I knowith nothing.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    The best place to start is here. http://java.sun.com/docs/books/tutorial/index.html When i first started programming in Java i read about half of the tutoral then decided to go get some books on java. Ive seen you post in the C++ forums so i gather that you understand C++ so you should have no problem learning java.

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Heres some diffrences between C and Java just so you can take a look at. Usually people want to know what the difference is beween languages, so this might help.

    No preprocessor directives: Java treats constant definitions as
    static final fields.

    No global variables: Java defines an extreamly clean namespace.
    Packages contain classes, classes contain methods and fields methods contain variables. Thus there is no possibility for namespace collisions.

    Well-defined primative type sizes:
    All the primative types in Java have well defined sizes. In C, the size of int, short ,long types is platform dependent, which hampers portability.

    Foward References: The Java compiler is smarter then the C compiler in it allows methods to be invoked before being defined. This elimates the need to define function in a header file before defining them in a program file, as is done in C.

    No method pointers: C allows the programmer to store the address of a function in a variable and pass that function pointer to other functions. You cannot do this with java methods but you can acheive similiar results by passing an object that implements
    a particular interface.

    Variable declarations anywhere: C only permitts local variable declarations to be at the beginning of a method or block. Java allows the variable declarations anywhere within a method or block. --NOTE-- most programmers perfer to keep variable declarations at the top of a block or method however.

    Garabage Collection: The Java Virtual Machine performs "Garabage Collection" or deallocation of memory automatically. This elimates the need for Java programmers to
    explictly manage memory used by all object and arrays. For instance an object is eligible for garabage collection if there are nolonger any variables that hold a refrence to that object.

    Method overloading: Java programs can define multiple methods with the same name as long as the methods have diffrent parameter lists.

  4. #4

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Is there a great advantage in the market place to learn Java? I never knew it was so widely used, but half the jobs I see postings for want you to know it?

    I supposed I'll give it a look. But I'm anti buying books. That's probably my weak point, but I seem to do well without them.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  5. #5
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    Java is solely an OO language. That's what it was made for, and it also happens to be one of the more widely used, for many of the reasons described above.

    C++, on the other hand, was an attempt (a good one) at making a procedural language an OO one, and as such, those in charge had respobsibilities to the procedural community, so it's not one of the solely OO languages. Java can be a real ***** at times. It's slow I find, but it's portable, and that's always handy.

    Because it is an OO language and nothing else, it's probably considered that if you kow Java, you know OO. I like to develop with Borland JBuilder, because it has a nice IDE, like VB in ways, but I compile with Sun's JDK, because JBuilder doesn't like various things.

    It's easy enough to learn, especially if you have some grasp on OO methodologies.

    But it's a fricking pain to work with I reckon.
    -----------------------------------------
    -RJ
    [email protected]
    -----------------------------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width