Adblock breaks this site

easies java tutorial

Discussion in 'Programming General' started by 128729972, Sep 27, 2008.

Thread Status:
Not open for further replies.
  1. 128729972

    128729972 Guest

    Referrals:
    0
    easies java tutorial

    Ok I have not seen A applet tutorial yet in this forum so here is one. I am unshure of how to use notepad at all when writing java and running it so anyone using it or knows how to make that work I'll edit my guid to fit its standerd's.

    I will explain what each part of the code does and for you swan I have reserched the data correctly. in my next tutorials on applets I will not explain the parts here.

    Code:
     import java.applet.*;
    tell the compiler where to find the methods you will use.
    and is required when you create an applet.

    Code:
    import java.awt.*;
    required to paint on screen

    Code:
    public class HelloWorld extends Applet 
    {
    the start of an applet - HelloWorld will be the executable class
    Extends applet means that you will build the code on the standard Applet class

    Code:
        public void init() 
         {
    The method that will be automatically called when the applet is started.

    Code:
    }
    It is required but does not need anything.


    Code:
    public void stop() 
         {
    This method gets called when the applet is terminated
    That's when the user goes to another page or exits the browser.
    Code:
    }
    Nothing needed yet.

    Code:
    public void paint(Graphics g) 
         {

    The standard method that you have to use to paint things on screen
    This overrides the empty Applet method, you can't just call it "display".

    Code:
    g.drawString("Hello World!",20,20); 
          g.drawString("GoodBye World!",20,40); 
    
         } 
    
    }
    method to draw text on screen
    String first, then x and y coordinate.

    That's it. My next tutorial will be on drawing shapes on the screen.


     
  2. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    easies java tutorial

    This is a horrible guide.... :/
     
  3. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    easies java tutorial

    What is wrong with notepad? Well, a lot of things, but why can't I use it? It comes with the operating system, and syntax highlighting is only a tool used for quick analysis of code. For the matter, I prefer Emacs as a text editor, but as an IDE (If you don't know, Integrated Development Environment), I prefer for Java, either Eclipse, JCreator (It's alright, but Windows only >_>), or even Netbeans in some cases.

    Java is NOT JavaScript. Two very different things; Java is an application development language used commonly for transmitting information and running applications through the internet (often with Java Web-Start or Applets). JavaScript is a scripting language designed for the dynamic display of content. The only similarity between the two is their syntax.

    WRONG. What it does is declare a class called HelloWorld. Due to Java's approach on object orientation, the class must be that of its filename.

    the method known as main() is simply a public static method of no return type which executes on the creation of a class. It is not the "first piece of code to execute," the initializer is.

    Yes ... Because the word 'several' totally covers the two ways mentioned here ...

    Anyhow, System.out.print() is the same method as System.out.println(), except System.out.println() appends a newline to the end of the given string. This isn't a "different way of doing things," as it is essentially executing the same code. You must also note that often one is required to print something to the console without appending a newline.

    Lastly, System is a package/namespace/whatever you want to call it in Java. System.out is also a Java package. It is simply a way of managing classes and methods and placing them under categories. To further this, you can even make your own packages by using the 'package' keyword and placing your class under a directory of the given package name.

    Well done for deducing that much.

    Perhaps you should have bothered to explain just what exactly the curly braces do in code? Most good guides will actually go in to a depth of detail about this, however you often have to pay for those (i.e. hard print books by certified professionals).

    Why exactly? What if I want to name something differently, or use a different string? Also, now that I think of it, have you explained what parameters and arguments are, the difference between them, and what String[] args does?

    If something doesn't work it's probably due to user fault. Debugging code is probably preferred to trying to build erroneous code.

    What if I'm on Linux or Macintosh? So far as I know, they use a UNIX based terminal that features no such thing as "press any key to continue."

    Because an entire tutorial is needed to show how to embed something in to a web page. Nice ending, too. *obvious sarcasm*

    Your main faults:
    1) Your English is terrible, even if it wasn't a bad guide, I wouldn't know. Most people who write good guides are good at the language they are using to convey information. >_>
    2) You didn't go anywhere near as in depth as you should have.
    3) This hardly explained anything.
    4) What you do explain, you don't explain correctly.
    5) When I was a beginner, I liked guides that explained to me the HOW aspect of things. If I don't know how, but only WHAT, then I won't know WHY, and hence I wouldn't understand. If you want to write a guide, it is imperative that you explain the HOW behind everything.

    Lastly, another "helloworld" tutorial is the last thing this forum needs. I'm tempted to spend hours writing guides on particular aspects of different languages ... Or perhaps a guide on writing guides, considering this thread ...

    I am of course, not discouraging you from programming. Not at all, I think it's brilliant that people want to develop software. However, I think that beginners should realise that they are indeed beginners, and they should leave the teaching to people that actually know what they're talking about.
     
  4. 128729972

    128729972 Guest

    Referrals:
    0
    easies java tutorial

    Swan what I mean by notepad was so I could answer questions for easily and for you ill allo anybody to be able to under standt it easily. and for the public class helloworld part i always get an error saying you must anme the file hellworld as well sorry if i was wronge may you inform me the definition of what it does or is it in that long letter.

    as you said i may not understand much but i only speciefied the things I knew for I have made script where it ask for user name pass word junk so i do know what iam talking about but you are right my keyboards on the frits that or it doenst get the letters i type when i type them.

    and i am sorry for all the errors i ahve made I will deleat the whole thing and type it up corectly thank you.
     
  5. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    easies java tutorial

    I'm sorry, what?

    It is correct that you must name the class the exact same name as the file, however you didn't explain it correctly, which was what I was getting at.

    You don't understand much as of the moment, no. Moreso, you don't cover what you should. This is more like an extended version of "copy and paste this and see what it does!"

    If you can type it up with proper spelling and grammar, credits to you. However your standard of spelling and grammar is quite low, perhaps taking some basic English classes will help you there.

    I'm sorry mate, but I just think that by the looks of the tutorial you've posted, it's not really up to par with teaching standard. The entire point of a guide is to teach someone something. This doesn't teach anything at all, and there is no evidence to suggest any future tutorials within the near future by you will be any different. To teach something you need to understand a lot more than the basics, even if you are teaching the basics. If you don't understand how everything works, you can't teach others how it works. You've shown WHAT happens, correct, but you haven't shown HOW or WHY, and this is a big downfall.

    I seriously don't think that this type of tutorial is what will help the users here, either. There are lots of them already posted.
     
  6. 128729972

    128729972 Guest

    Referrals:
    0
    easies java tutorial

    ok swan I shall wait till iam better then and can get these all answered then ill continue good enough? at the mean time i shall simply make scripts.
     
  7. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    easies java tutorial

    I'm happy with that. Go for it. On another note, locked.
     
< writing all items in listbox [problem] | [Help] Creating an IRC Client >
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site