basic JAVA tutorial - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: basic JAVA tutorial

  1. #11
    Jaded Network Admin nebulus200's Avatar
    Join Date
    Jun 2002
    Posts
    1,356
    It would probably be helpful if you started out describing some of the basic features and terminology of java before jumping right into a program. The program might not be that hard to jump into if you are familiar with c++ and objects, but it is the kind of thing that if you haven't seen before, this could kind of blow people's minds.

    I would suggest starting off describing the object oriented model. Descriping how it can take on characteristics of a real object and how objects can interact. One of the best ways I have seen this described is to right a sentence about something you want your program to do, the nouns can be your objects, the verbs/adverbs your methods. Once you get that out, I would recommend, then discussing how java is entirely object oriented, how everything in java is an object and that there are several 'sub-objects' that inherit properties of lower level objects and then expand upon them (and then in turn are inherited). This would go a long way to explaining why there is a system object and why it is used for outputing, why you are using string objects, etc.

    Once you have all that down, then I would jump into a sample program like you did and demonstrate how the objects interact. Once you have down the fundamental idea of java being object oriented and basically centered around object interaction, the rest is basically learning syntax (which is very very similar to c++)...

    Neb

    Damn, couple of corrections, expanding of what I was saying (I tried to get this out too quick). 'described is to right' --> 'described is to write'

    Also when I was discussing object interactions and inheriting object properties, and how there can be multiple levels of object property inheritance and how this leads to things in your code like System.out.println, where you are accessing the println method in the out object in the system object (or something to that effect, sorry been a few years since I used java). The other thing that I was getting at in the discussion of everything being object oriented that I left off is that java ITSELF is entirely object oriented, that every operator and data type and method is defined within various objects (ie., system.out.println) and that is why it is so critical to fully understand object oriented programming to properly understand java...


    neb

    There is only one constant, one universal, it is the only real truth: causality. Action. Reaction. Cause and effect...There is no escape from it, we are forever slaves to it. Our only hope, our only peace is to understand it, to understand the 'why'. 'Why' is what separates us from them, you from me. 'Why' is the only real social power, without it you are powerless.

    (Merovingian - Matrix Reloaded)

  2. #12
    Junior Member
    Join Date
    Sep 2002
    Posts
    4
    I will be posting my own Java Tutorial (my first tutorial) within the next day or so. Keep your eyes open.

  3. #13
    Junior Member
    Join Date
    Aug 2001
    Posts
    22
    Thanks this is extreamly helpful. Thanks for taking the time to write it.

  4. #14
    after i put it in a text file what would i name the extention?

  5. #15
    Junior Member
    Join Date
    Sep 2002
    Posts
    14
    All java source files must have the .java extension in order to be compiled.

  6. #16
    I apologize but I code, but am a newbie to Java. I read a lot of tutorials and such, but I still do not understand it. On the otherhand I can understand it perfectly if somebody taught me the bare basics I can pick up everything else real quick. Is that a problem for other people, and if so how did you rectify it? Thanks for the tutorials, even if they did not stick with me. The effort is and will be appreciated by many.

  7. #17
    Senior Member
    Join Date
    Jan 2004
    Posts
    228
    It's cool to see some newbies writing some tutorials on here. I'm pretty much new at programming as well, just started making GUIs in Java. Have you tried using JDK 1.5 yet? I've been seeing fewer people using System.out.println(); or System.out.print(); Lately, I've been seeing them use System.out.printf(); I normally stick with the old method, but this new method make concatination (spelling) simplier.

    Also, have you all tried using JGrasp yet? I started using it and it seems pretty cool, but I've ran into a few instances when I was completely fooled into remembering to save my work.

    For those of you who haven't used it, you can compile and run your program without saving. I've also ran into some problems where the changes weren't completely made and JGrasp didn't register them. I sucked big time. My program worked, but I guess JGrasp didn't see enough in the original program to make the change to the class file.

Posting Permissions

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