Frist I would Like to Welcome All the members in this Forum

And Also i would like to represent some tutorials about Java , and this frist tutorials maybe look selly to some people but as we move far in this programming language it will get harder and harder ... it seems that i talk so much so lets start .

The Frist Tutorial will be on the Inroduction part of Java and after i will finish the Tutoial will a practical Questions .
ok lets start the Tutorial .

I will start with with the code after that i will explain it :

public class FristProgram {

    public static void main (String [] args) {
    	
    	System.out.println("Welcome to Java programming.");
    }
    
    
}

As we sea in the code the Line is the code in the Class name .
the second line in the code is the main method .
the third line is the the text that will apear in the sreen , we should use the
System.out.println or System.out.print to print the output .
some people maybe say what is the diffrence bettween the two , the diffrence the first one
it will automatilly print a new line and the second one dont print .

now after this brefing example we will move to more harder one :

public class Add {

    public static void main (String [] args) {
    	
    	int a = 70;
    	int b = 80;
    	
    	System.out.println(" a + b = " + (a+b) );
    }
    
    
}

The output of this program will be :
a + b = 150

Fristly we intialize the a and b ;
a = 70 and b = 80
after that we print the output using System.out.println .

I hope you are getting some benefit from this tutorials .
Thanks for your reading .
and please if you have any question in this tutorial dont hesitate to ask .
that is all and have a nice time .

Recommended Answers

All 2 Replies

In my (humble) opinion, you might want to improve your english before trying to write tutorials in them, since it will be harder for newbies to understand texts that are made in other than their maternal languages, certainly if the text contains errors. also, it might be a good idea to start off explaining about what exactly Java is, instead of immediately starting with code.

explain some of the principles behind it: encapsulation, inheritance, OO, ... there's a lot you can say about the language and it's possibilities before start coding.

if you do want to start of with the programming, well, that's your choice, but don't make mistakes in your explanation, and keep your explanation short, but complete. I'll give you some examples, and no, I'm not going to correct any mistakes against the english language.

As we sea in the code the Line is the code in the Class name .

it might be good to mention to newbies, and I believe your tutorials are ment for them, that a class Program should always be placed in the file Program.java
since it is a tutorial for 'dummies', to say it this way, you might also explain to them how to compile and run the code.

the second line in the code is the main method .

and a newbie would ask: what 's the difference?

the third line is the the text that will apear in the sreen , we should use the
System.out.println or System.out.print to print the output .
some people maybe say what is the diffrence bettween the two , the diffrence the first one
it will automatilly print a new line and the second one dont print .

actually, I can assure you, that the second one does print, it just doesn't start a new line to print. I guess this is what you meant, but you should make that crystal clear to dose who do not now anything about Java and start from scratch

now after this brefing example we will move to more harder one :

public class Add {

    public static void main (String [] args) {
    	
    	int a = 70;
    	int b = 80;
    	
    	System.out.println(" a + b = " + (a+b) );
    }
    
    
}

The output of this program will be :
a + b = 150

before you want them to actually use variables, you might explain to them the difference between Objects, primitives, ...
what are the differences, what do they mean, what do I need to use in which case?

I hope you are getting some benefit from this tutorials .
Thanks for your reading .
and please if you have any question in this tutorial dont hesitate to ask .
that is all and have a nice time .

if you are serious about writing tutorials, there's nothing wrong with starting easy, but you might want to put something more in it, this tutorial, even if badly written, would take someone without knowledge about ten minutes or less to finish. They would know how to write the programs above, but they wouldn't truly understand what happens under the hood.

I'd say, keeping it simple for beginners is a good thing, but put more information in it

ok man , and thanks for your correction and the next tutorial will be better than this .

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.