Bonjour,
J'ai commencé à apprendre le java hier, et j'ai voulu faire des test.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
import java.util.*;
class debut {
 
 
		public static void main (String args[]) {
 
			Scanner sc = new Scanner(System.in);
 
//[...]
Mais il y a un problème avec le Scanner:

[phast@ordi-phast:~/Bureau/programmation/java/debut]$ javac main.java
----------
1. ERROR in main.java (at line 7)
Scanner sc = new Scanner(System.in);
^^^^^^^
Scanner cannot be resolved to a type
----------
2. ERROR in main.java (at line 7)
Scanner sc = new Scanner(System.in);
^^^^^^^
Scanner cannot be resolved to a type
----------
2 problems (2 errors)

Pour l'installer, j'ai fait:
-[phast@ordi-phast:~/Bureau]$ chmod a+x jre-6u11-linux-i586-rpm.bin
[phast@ordi-phast:~/Bureau]$ ./jre-6u11-linux-i586-rpm.bin


- sudo aptitude install sun-java6-jre sun-java6-plugin



Que faut il que je fasse?

PS: je suis sous ubuntu

Merci d'avance.