How to make bread easy in 13 easy steps

  1. 3 cups of lukewarm water
  2. add 2 teaspoons of instant yeast
  3. Stir and leave it for 3 minutes
  4. add 2 teaspoons of salt
  5. 2 tablespoons of sugar
  6. 2 tablespoons of vegetable oil
  7. Stir
  8. add 3 cups of floor
  9. (optional) add quarter cup of corn meal floor
  10. Mix well
  11. leave for 30 – 45 minutes for the dough to rise
  12. Set oven to 180°C  (about 325 °F )
  13. check after 15 – 20 minutes
  14. voila

Java tip

Quick trivia : The Java modifiers syncronized and native only apply to methods. Native methods do not have a body.

Getting the longest first name from and array.

import javax.swing.JOptionPane;
public class OwnJavaArray {
public static void main(String[] args) {
String[] name = new String[3];
for (int x = 0; x < name.length; x++) {
int number = x + 1;
name[x] = JOptionPane.showInputDialog(null, "Please enter first and last name " + number);
}
String[] name0 = name[0].split(" ");
String[] name1 = name[1].split(" ");
String[] name2 = name[2].split(" ");
String longName = (name0[0].length() > name1[0].length()) ? name0[0] : name1[0];
longName = (longName.length() > name2[0].length()) ? longName : name2[0];
JOptionPane.showMessageDialog(null, "The longest name is " + longName);
}
}

Getting the lowest and highest number from an array : Java

import javax.swing.JOptionPane;

/**
*
* @author http://vikta.org
*/
public class Main {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int[] numInt = new int[5];
int maxNum = 0;
int minNum = 0;

for (int i = 0; i < numInt.length; i++) {

numInt[i] = Integer.parseInt(JOptionPane.showInputDialog(null, “Please enter a number”));

if (i == 0 || numInt[i] > maxNum) {
maxNum = numInt[i];
}

if (i == 0 || numInt[i] < minNum) {
minNum = numInt[i];
}
}

JOptionPane.showMessageDialog(null, “The highest number is ” + maxNum + “\nThe lowest number is ” + minNum);
}

}

March 2010
M T W T F S S
« Feb    
1234567
891011121314
15161718192021
22232425262728
293031