yeah disebabkan pendrive aku dah ilang.. so aku erpakse post kerja skolah aku kat sini… heheh nanti kat lab aku copy balik… yeah kerja sekolah bersama incik Agung… heheheheh….
import javax.swing.*;
class palindrome
{
public static void main(String args[])
{
String palin;
StringBuffer drome;
JOptionPane.showMessageDialog(null,”Welcome To UTP Palindrome Checker”);
palin = JOptionPane.showInputDialog(null,”Please Insert A Word”);
drome = new StringBuffer(palin);
drome.reverse();
if(palin.equalsIgnoreCase(drome.toString()))
{
JOptionPane.showMessageDialog(null, palin+ ” is a palindrome”);
}
else
{
JOptionPane.showMessageDialog(null, palin+ ” is not a palindrome”);
}
System.exit(0);
}
}