twc
Posts: 129
Nickname: twc
Registered: Feb, 2004
|
|
Re: a couple of newbie questions ..
|
Posted: Feb 9, 2004 6:11 AM
|
|
> QUES 1 : What does these means? > import java.io.*; > import java.text.DecimalFormat;
They allow you to use the shorter class name of a class, rather than the whole name that includes the package. For example, the first line allows you to use any class in the java.io package without having to type in the whole name.
File myFile = new File("SomeName"); instead of java.io.File myFile = new java.io.File("SomeName");
> QUES 2 : Why the name of the parameters has to be unique > when a method calls and receives? ("AntallRekker" and > "AntRekk") > LagTipperekker(AntallRekker); > static void LagTipperekker(int AntRekk)
They don't have to be unique. But most beginners think that they have to be the same, so example writers tend to make them different to emphasize that they can be different. > QUES 3 : When is the meaning of using > double FOR loops?
I don't understand your question. Can you give an example?
> QUES 4 : Why have these --> [] after CHAR? > static char[] OppgiRiktigRekke()
char is a single char variable, but char[] is an array of char variables.
> Ques 5 : Does the meaning of Void means a method doesnt > need to return anything back?
Yes.
> Ques 6 : Why have these --> [] after CHAR? > static void SkrivUtRekke(char[] Tab)
See above.
> Really appreciate for the answers =)
Glad to help.
|
|