Ce forum est maintenant fermé, seule cette archive statique reste consultable.
  FORUM Rue-Montgallet.com
  Programmation
  Java

  Problème compliation

Bas de page
Auteur Sujet :

Problème compliation

n°18726
u54
Profil : Jeune recrue
Posté le 25-06-2007 à 10:49:26  
 

Bonjour je suis en train de lire un livre pour apprendre le Java, et voici le premier programme qu'il me donne:  
 
// Mon premier programme en Java
public class PremierProgramme {
 public static void main(String[] argv) {
  System.out.printIn("Ca marche !" );
 }
}
 
La compilation ne s'effectue pas correctement et elle indique ceci :
 
C:\java>javac PremierProgramme.java
PremierProgramme.java:4: cannot resolve symbol
symbol  : method printIn (java.lang.String)
location: class java.io.PrintStream
                System.out.printIn("Ca marche !" );
                         ^
1 error
 
Pourtant jai bien suivi les instructions, aucune faute de frappe, configuration des chemins d'accès au programme exécutable : OK , configuration classpath : OK.
 
Je ne comprends l'erreur dans le programme la petite flèche indique le point or pour séparer une méthode d'un objet et un objet d'une classe : c'est bien le "." qu'il faut utiliser.
 
Pourriez-vous m'aider.
Merci d'avance

mood
Pub
Posté le 25-06-2007 à 10:49:26  
 

n°18729
Tastito
So lost in love
Profil : Dinosaure
Posté le 25-06-2007 à 16:28:32  
 

Normalement c'est : System.out.printLn
 
Ln pas In
 
:)


---------------
"Oh, that girl, you know she really, blows my, head apart,  
And the sky and the stars, all, synkronized...  
Eh no.... No no no, now me and her,  
We are in love... "  
n°18734
u54
Profil : Jeune recrue
Posté le 25-06-2007 à 19:54:32  
 

J'ai changé System.out.printIn par System.out.printLn comme vous l'avez dit mais mais l'erreur persiste :
 
C:\java2\PremierProgramme>javac PremierProgramme.java
PremierProgramme.java:4: cannot resolve symbol
symbol  : method printLn (java.lang.String)
location: class java.io.PrintStream
                System.out.printLn("Ca marche !" );
                          ^
1 error

n°18735
Tastito
So lost in love
Profil : Dinosaure
Posté le 25-06-2007 à 21:43:38  
 

ln en miniscule pardon


---------------
"Oh, that girl, you know she really, blows my, head apart,  
And the sky and the stars, all, synkronized...  
Eh no.... No no no, now me and her,  
We are in love... "  
  FORUM Rue-Montgallet.com
  Programmation
  Java

  Problème compliation

© 2000-2024 Forum.rue-montgallet.com - Tous droits réservés