Runescape Bits & Bytes
https://www.rsbandb.com/forums/

Beginners Java Question
https://www.rsbandb.com/forums/viewtopic.php?f=38&t=81018
Page 1 of 1

Author:  March 30th [ April 28th, 2011, 12:15 pm ]
Post subject:  Beginners Java Question

Hey, I just started learning Java. I know this may be a stupid question but I already know how to write simple codes but is there a special program to run them? I use the eclipse IDE for coding and it has a run feature built in, do you also write the client that displays the program you wrote in Java? Here is one of the things I've written so far:

import java.util.Scanner;

class Calculator{
public static void main(String args[]){
Scanner Tyler = new Scanner (System.in);
double fnum, snum, answer;
System.out.println("Enter first number please.");
fnum = Tyler.nextDouble();
System.out.println("Enter second number please.");
snum = Tyler.nextDouble();
answer = fnum + snum;
System.out.println(answer);
}
}

Any help is appreciated. Thanks in advance.

Author:  Adbot [ April 28th, 2011, 12:15 pm ]
Post subject:  Register and login to get these in-post ads to disappear


Author:  Ranging God [ April 28th, 2011, 2:36 pm ]
Post subject:  Re: Beginners Java Question

I think this is what you mean? I program in c# so I use visual studio's but I dont think it supports Java programming.

http://www.oracle.com/technetwork/topic ... downloads/index.html

Author:  Shane [ April 28th, 2011, 4:13 pm ]
Post subject:  Re: Beginners Java Question

Read my articles on learning how to program. They're based in Java. They got everything from what to use to some starting exercises.

http://informer.rsbandb.com/article/201 ... g-how-to-program.htm

http://informer.rsbandb.com/article/201 ... o-program-part-2.htm

Also, what do you mean by "write the client that displays the program you wrote in Java"?

Author:  Ranging God [ April 28th, 2011, 6:36 pm ]
Post subject:  Re: Beginners Java Question

Shane wrote:
Read my articles on learning how to program. They're based in Java. They got everything from what to use to some starting exercises.

http://informer.rsbandb.com/article/201 ... g-how-to-program.htm

http://informer.rsbandb.com/article/201 ... o-program-part-2.htm

Also, what do you mean by "write the client that displays the program you wrote in Java"?



I think he means like coding the thing that runs it, like Visual Studio's, so no you wouldnt.

Author:  Burnt Joint [ April 29th, 2011, 2:27 am ]
Post subject:  Re: Beginners Java Question

Notepad++ is good, here's the website: www.notepad-plus-plus.org

Author:  Ranging God [ April 29th, 2011, 8:30 am ]
Post subject:  Re: Beginners Java Question

Burnt Joint wrote:
Notepad++ is good, here's the website: http://www.notepad-plus-plus.org



You can't compile with it though, which I think he was asking about.

Author:  Adbot [ April 29th, 2011, 8:30 am ]
Post subject:  Register and login to get these in-post ads to disappear


Author:  Shane [ April 29th, 2011, 12:41 pm ]
Post subject:  Re: Beginners Java Question

BlueJ. It's nice and simple, mentioned in the articles.

Author:  ryan1 [ May 3rd, 2011, 2:38 pm ]
Post subject:  Re: Beginners Java Question

You can write what is called a driver program for other classes that you write, but it is not necessary unless you're doing a pretty big project. The driver program will create a new object of the class, and then use its methods to do things.

like:

public class driverClass
{
public static void main(String args[])
{
// Creating an object from the outside class file
otherClass foo = new otherClass(Parameters to constructor);

// Using one of the object's methods
foo.otherClassMethod();
}
}

Not sure if this is what you were looking for.

Author:  Jamie [ May 4th, 2011, 9:20 am ]
Post subject:  Re: Beginners Java Question

I have used JCreator and Netbeans as Java IDEs (of which I would recommend Netbeans). Make sure you download JDK, set its path (if necessary) in the IDE, and then you can compile and run your program. The same should apply to Eclipse.

Author:  newhero [ May 4th, 2011, 7:12 pm ]
Post subject:  Re: Beginners Java Question

camelCase would be also nice to learn ;) im sure your teacher would love it also even more is tabing your code "i know this is a forum"

Author:  Ranging God [ May 4th, 2011, 7:25 pm ]
Post subject:  Re: Beginners Java Question

newhero wrote:
camelCase would be also nice to learn ;) im sure your teacher would love it also even more is tabing your code "i know this is a forum"



Funny not. I'm so use to using camelCase that I use it not when saving files >.<

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/