foinfo
Messages postés2Date d'inscriptionsamedi 26 mars 2011StatutMembreDernière intervention 7 avril 2011
-
7 avril 2011 à 17:32
bonjour tout le monde:
mon programme est le suivant ,
je ne sais pas ou se trouve l'erreur , quand je tape javac exo1.java dans le dos , l'erreur suivant apparaît
';' expected
Static String msg=JOptionPane.showInputDialog(laphrase);
import java.lang.String;
import javax.swing.JOptionPane ;
public class exo1
{
public class pile
{
private static final int taille=15;
protected char[] tab;
protected int p;
public pile(int t)
{
tab = new char[t];
}
public void raz()
{ p=0;
}
public void empiler(char c)
{
tab[p++]=c;
}
public char depiler()
{
return tab[--p];
}
public int vide()
{ if (p==0)
return 1;
}
public int plein()
{
if (p==14)
return 1;
}
}
public static boolean voyelle(char k)
{ return((k=='a') ||
(k=='o') ||
(k=='i') ||
(k=='e') ||
(k=='y') ||
(k=='u'));
}
public static void main(String args[])
{
pile p;
p=new pile(10);
String laphrase="taper votre phrase";
Static String msg=JOptionPane.showInputDialog(laphrase);
int i;
for(i=0;i<msg.length;i++)
{ if (p.plein()==0)
{ if (voyelle(msg.substring(i,i+1))==true)