I am asking, because coming from Java that forces you to classes I dont know how i should approach it. I never had that freedom of not having to put everything inside a class.
Thanks.
This post has been edited by atraub: 05 August 2012 - 03:08 PM




Posted 03 August 2012 - 10:19 AM
This post has been edited by atraub: 05 August 2012 - 03:08 PM
Posted 03 August 2012 - 10:23 AM
Posted 03 August 2012 - 10:26 AM
Posted 03 August 2012 - 11:23 AM
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
print("Hello World")
This post has been edited by atraub: 03 August 2012 - 11:24 AM
Posted 03 August 2012 - 11:39 AM
atraub, on 03 August 2012 - 01:23 PM, said:
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
print("Hello World")
Posted 03 August 2012 - 12:42 PM
import java.io.*;
public class GetUserInput {
public static void main (String[] args) {
System.out.print("Enter your name and press Enter: ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String name = null;
try {
name = br.readLine();
} catch (IOException e) {
System.out.println("Error!");
System.exit(1);
}
System.out.println("Your name is " + name);
}
}
name = input("Enter your name and press Enter: ")
This post has been edited by atraub: 03 August 2012 - 12:54 PM
Posted 03 August 2012 - 12:52 PM
#!/usr/bin/python
Posted 03 August 2012 - 01:04 PM
atraub, on 03 August 2012 - 02:42 PM, said:
Scanner input = new Scanner(System.in);
System.out.println("Enter your name");
String name = input.nextLine();
int i = query("How many lumps of sugar would you like?", 1);
Posted 03 August 2012 - 01:04 PM
Ryano121, on 03 August 2012 - 03:56 PM, said:
System.out.println("Enter your name and press Enter: ");
String name = new Scanner(System.in).nextLine();
name = input("Enter your name")
jon.kiparsky, on 03 August 2012 - 04:04 PM, said:
This post has been edited by atraub: 03 August 2012 - 01:09 PM
Posted 03 August 2012 - 01:05 PM
Ryano121, on 03 August 2012 - 03:56 PM, said:
System.out.println("Enter your name and press Enter: ");
String name = new Scanner(System.in).nextLine();
Posted 03 August 2012 - 01:13 PM
Dogstopper, on 03 August 2012 - 03:05 PM, said:
This post has been edited by jon.kiparsky: 03 August 2012 - 01:20 PM
|
|
Query failed: connection to localhost:3312 failed (errno=111, msg=Connection refused).
|
