twitter

Sunday, October 30, 2011

Java Programming Chapter 7 (Multiple Three)

Meet again in Java Programming with me Taufik R Firdaus. Ok in this time I will share to you, how to make program Multiple of Three. Check this code... :
import javax.swing.JOptionPane;
public class MultipleThree {
 public static void main(String[] main){
  int var1 = Integer.parseInt(JOptionPane.showInputDialog("Input end of number : "));
  for (int i=1; i <= var1; i++){
   if (i%3 ==0){
    System.out.println(i);
   }
  }
 }
}


  1. % sign it use for Mod (residual from divide)
  2. If state use for selection if value variable i mod 3 is 0 then show the number variable i

Ok see you agan in next chapter...

Friday, October 28, 2011

Java Programming Chapter 6 (If Statement with Constructor)

Chapter 6 If statement with constructor in this chapter we will meet source code IF Statement with Constructor, check this code :
public class IfCabang { double angka; public IfCabang(){ } public IfCabang(double angka) { this.angka = angka; } public void setAngka(int angka) { this.angka=angka; }

Java Programming Chapter 5 (If Statement)

In this chapter I will explain about If statement, OK check this code :
The if statement has this form, where condition is true or false.
... // Do these statements before. if (condition) { ... // Do this clause if the condition is true. } ... // Do these statements after.

or
... // Do these statements before. if (condition) { ... // Do this clause if the condition is true } else { ... // Do this clause if the condition is false } ... // Do these statements after.

What is Network?

A network is nothing more than two or more computers connected by a cable (or in some cases, by a ireless connection) so that they can exchange information.
Of course, computers can exchange information in other ways besides networks. Most of us have used what computer nerds call the sneakernet. That’s where you copy a file to a diskette and then walk the disk over to someone else’s computer. (The term sneakernet is typical of computer nerds’ feeble attempts at humor, and why not? As a way to transfer information, sneakernet was pretty feeble.)

Monday, October 24, 2011

Java Programming Chapter 4 (Bigger Number)

Ok in this chapter i will share how to find the bigger number with use Java Input Output Buffered Reader check this code :
import java.io.*;
public class BiggerNum{
 public static void main(String[] args){
  BufferedReader inputnum = new BufferedReader(new InputStreamReader(System.in));
  String i="";
  int temp=0;
  for(int j=1; j<=3; j++){
   System.out.print("Input to"+j+" : ");
   try {
    i = inputnum.readLine();
   }catch(IOException e){
    System.out.println("data error!!!");
   }
   int input= Integer.parseInt(i);
  if (temp<input){
   temp=input;
   } 
  }
  
  System.out.println("Bigger number is : "+temp);
 }
}