import jeliot.io.*;
public class Cek_Kata {
public static boolean cek() {
String kata1 = "Algo";
char huruf = 'g';
int len = kata1.length();
for (int i=0; i< len; i++) {
if (kata1.charAt(i) == huruf) {
return true;
}
}
return false;
}
public static void main() {
if (cek())
System.out.print("Ada");
else System.out.print("Tidak Ada");
}
}
Friday, February 24, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment