Problème Eclipse!
Résolu
moli.Bym
Messages postés
48
Statut
Membre
-
moli.Bym Messages postés 48 Statut Membre -
moli.Bym Messages postés 48 Statut Membre -
Bonjour,
mon Eclipse n'exécute pas ce qu'il se trouve dans la boucle if..
est ce que quelqu'un a eu un problème pareil ?
ou sait ou est le problème??
Merci.
mon Eclipse n'exécute pas ce qu'il se trouve dans la boucle if..
est ce que quelqu'un a eu un problème pareil ?
ou sait ou est le problème??
Merci.
A voir également:
- Problème Eclipse!
- Eclipse java - Télécharger - Langages
- Honeywell eclipse ms5145 configuration français - Forum PC portable
- Eclipse temurin jre avec hotspot - Forum Java
- Problème avec douchette honeywell - Forum Matériel & Système
- Désinstaller eclipse - Forum Linux / Unix
public class PremPass {
public static void main(String []args){
String label,operat,op1,op2;
Instruction inst = new Instruction();
System.out.println("entrez le label, S'il n y a pas de label écrivez //");
Scanner sc= new Scanner(System.in);
label=sc.next();
System.out.println("entrez l'opération");
operat=sc.next();
if (operat=="add"){
System.out.println("entrez les opérandes");
op1=sc.next();
op2=sc.next();
inst=new Instruction(label,operat,op1,op2);}
else
if(operat=="stop") {
inst=new Instruction(label,operat);
}
else
if(operat=="copy"||operat=="divise"||operat=="load"||operat=="multi"||operat=="read"||operat=="sub"||operat=="store"||operat=="write"){
System.out.println("entrez l'opérand");
op1=sc.next();
inst=new Instruction(label,ope,op1);
}
System.out.println(inst.label+" "+inst.operat+" "+inst.op1+" "+inst.op2);
}
}
if (operat.equals("stop"))De même bien sûr pour tous tes tests suivants (qui seront forcément tous faux avec ==)