Ceriwis  

Go Back   Ceriwis > HOBI > Komputer & Teknologi > Programming

Programming Share, tanya jawab, saling bantu antar programmer dengan berbagai macam bahasa pemrograman.

Reply
 
Thread Tools
  #1  
Old 11th November 2011
Braincode's Avatar
Braincode Braincode is offline
Ceriwis Addicted
 
Join Date: Nov 2011
Posts: 4,638
Rep Power: 20
Braincode mempunyai hidup yang Normal
Default [ask]

import java.util.Scanner;

public class Coba{

public static void main(String[] args) {

Scanner input=new Scanner(System.in);

String user,pass;

System.out.print("User Name :");

user=input.nextLine();

System.out.print("Password :");

pass=input.nextLine();

pass="akakom";

if (pass.equals("Nuclear"))

System.out.println("Password Anda Benar");

else

System.out.println("Password Anda Salah");

}

}



mau tnya soal program ane nigan kenapa jika password yang dimasukin benar memang jawabanya benar tapi jika password nya dimasukin salah jawabanya kok tetep bener ya gan dimana kesalahannya yagan tolong mbenerin.

Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


 


All times are GMT +7. The time now is 02:44 AM.


no new posts