| Simple Method2 Thu Sep 15, 2011 5:59 am by Admin File name: method2.java
- Code:
public class method2{
public static void main(String[] args){
int value=5;
callvalue(value);
}
public static void callvalue(int x)
{
System.out.println("I am the text inside method callvalue");
System.out.println("I received …
Simple Method 1 Thu Sep 15, 2011 5:55 am by Admin File name: method1.java
- Code:
public class method1{
public static void main(String[] args){
callmethodA();
callmethodB();
}
public static void callmethodA()
{
System.out.println("I am the text inside method A");
}
public …
Input Computation - Using Methods Thu Sep 15, 2011 5:44 am by Admin File name: methods.java
- Code:
import java.io.*;
public class methods {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String name;
int age;
public static void main(String[] args)throws IOException {
methods m = new methods();
m.menu();
}
public void …
Switch and Case Sun Sep 04, 2011 5:36 pm by Admin File name: case.java
- Code:
import java.io.*;
public class case{
public static void main(String[] args)throws IOException{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
int choice;
try{
System.out.println("Choose Your Favourite Color:");
System.out.println("[1] …
Java - Catch Exception Sun Sep 04, 2011 3:38 pm by Admin File name: catcherror.java
- Code:
import java.io.*;
public class catcherror{
public static void main(String[] args)throws IOException{
int inp;
try{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter Your Favourite Color:");
…
Looping 0 and 1 Sat Sep 03, 2011 8:56 pm by Admin File name: loop.java
- Code:
public class loop{
public static void (String[] args)throws IOException{
BufferedReader input = new BufferedReader (new InputStreamReader(System.in));
int x, y, number;
System.out.println(" ");
System.out.println("Enter Number:");
number = …
Compute Sphere Radius Sat Sep 03, 2011 8:20 pm by Admin File name: sphere.java
- Code:
public class sphere{
public static void main(String[] args)throws IOException{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
double a, pi, sphere, rad;
pi = 3.1416;
System.out.println("Enter Radius:");
…
Arithmetic (Input/Output) Thu Aug 25, 2011 9:04 pm by Admin File name: arithmetic2.java
- Code:
import java.io.*;
public class arithmetic2{
public static void main(String[] args)throws IOException{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
double ave, quot, num1, num2, sum, diff, prod, mod;
System.out.println("Enter Number for …
Arithmetic Display Only (No Input/Output) Thu Aug 25, 2011 8:46 pm by Admin File name: arithmetic.java
- Code:
public class arithmetic{
public static void main(String[] args){
int sum, quot, diff, mod;
double ave;
sum = 1+1+8;
diff = 15-7;
quot = 22/2;
prod = 5*6;
mod = 20%5;
…
Project - Rock, Paper, Scissor Game Wed Aug 24, 2011 10:57 pm by Admin File name: rps4.java
- Code:
import java.io.*;
import java.util.*;
public class rps4{
public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int choice;
Random r=new Random();
int x=0;
do{
System.out.println("Choose: …
Display Profile Tue Aug 23, 2011 9:20 pm by Admin File name: profile.java
- Code:
public class profile{
public static void main(String[] args){
String name, stat, dob, occup;
int age, yob, month;
double eval;
char gender;
Name = "John Smith";
Stat = …
How to Program "Hello World" Tue Aug 23, 2011 8:22 pm by Admin File Name: helloworld.java
- Code:
public class helloworld{
public static void main(String[] args){
System.out.println("Hello World!")
}
}
Display Results:
Hello World! | We have 24 registered users The newest registered user is zeaalonOur users have posted a total of 158 messages in 137 subjects In total there are 3 users online :: 0 Registered, 0 Hidden and 3 Guests None [ View the whole list ] Most users ever online was 198 on Sun Apr 11, 2021 12:33 am |