The Artima Developer Community
Sponsored Link

Java Answers Forum
a couple of newbie questions ..

2 replies on 1 page. Most recent reply: Feb 10, 2004 3:07 AM by kelvin

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
kelvin

Posts: 2
Nickname: hotrails
Registered: Feb, 2004

a couple of newbie questions .. Posted: Feb 7, 2004 2:57 AM
Reply to this message Reply
Advertisement
QUES 1 : What does these means?
import java.io.*;
import java.text.DecimalFormat;

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)

QUES 3 : When is the meaning of using
double FOR loops?

QUES 4 : Why have these --> [] after CHAR?
static char[] OppgiRiktigRekke()

Ques 5 : Does the meaning of Void means a method doesnt need to return anything back?

Ques 6 : Why have these --> [] after CHAR?
static void SkrivUtRekke(char[] Tab)

Really appreciate for the answers =)


twc

Posts: 129
Nickname: twc
Registered: Feb, 2004

Re: a couple of newbie questions .. Posted: Feb 9, 2004 6:11 AM
Reply to this message Reply
> 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.

kelvin

Posts: 2
Nickname: hotrails
Registered: Feb, 2004

Re: a couple of newbie questions .. Posted: Feb 10, 2004 3:07 AM
Reply to this message Reply
thanks twc !! ^^
good answers! =)

Flat View: This topic has 2 replies on 1 page
Topic: EXECUTING SYSTEM COMMANDS THRU JAVA Previous Topic   Next Topic Topic: Waiting Dialog

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use