aspose file tools*
The moose likes Beginning Java and the fly likes java installation procedure.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

java installation procedure..

archana keerti
Greenhorn

Joined: Feb 03, 2009
Posts: 20
hey guys,
i am new to java....
would you please help me how to compile and execute the java codes.
which java installation package should i install?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39435
    
  28
Welcome to JavaRanch
Have a look at the getting started part of the Java Tutorials. Download JDK 6 update 11. Don't use the JRE (it hasn't got a compiler) and don't use NetBeans at this stage.

It tells you in great detail what to do: the bit which most commonly causes trouble is setting the PATH. Please ask again if you have any problems.
archana keerti
Greenhorn

Joined: Feb 03, 2009
Posts: 20
hi ,
please anyone could help me...i have a problem in the compilation of the below given program.

public class puzz
{
public static void main(String args[])
{
dog[] d=new dog[6];
int x=0;
int y=1;
int result=0;

while(x<6)
{
dog[x]=new dog[];
d[x].v=y;
y=y*10;
x=X+1;
}
x=6;
while(x>0)
{
x=x-1;
result=result+d[x].do(x);
}
System.out.println("result is"+result)

}

}


class dog
{
int v;
public int do(int f)
{
if(v>100)
{
return v*f;

}
else
{
return v*(5-f);
}
}
}


the required output for the program is 543345.


when i compile i get some error messages like,illegal start of type,<identifier>expected, ; expected.....
i couldn't find where i am wrong.....
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18896
    
  40

Duplicate post....

http://www.coderanch.com/t/431658/Java-General-beginner/java/compilation-error


Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java installation procedure..