- ' +. /0 ( 1 +. ' &+. /"0 &1,

11  Download (0)

Full text

(1)

! " # $ % & ' ( ) * ++ , - ' + . / 0 ( 1 + . ' & + . / " 0 & 1, , + . 2 " !

public class Essai {

static public void main(String[] args)

{

System.out.println("Un essai...");

outils.Calcul un_calcul = new outils.Calcul();

System.out.println(un_calcul.somme(4,5)); } } 3 4 / 0 -! package outils; public class Calcul {

public int somme(int x,int y)

{

return x+y;

}

}

(2)

- / 0 , , , ++, 6 7 , / !89 8 9 8: 0 ; ' . + . / 2 " 0 ! • 7< 6 6 + . / 2 0 , = 9 ,+ > + . , / !89 8 9 8: 0 • 6 , / " 0 1 , 2 = # - . . + . / 8 0 & + . / 8 " 0 1& 6'6 + . > , + . / 0 ; , 2 " !

D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.java] !89 8 9 8: 2 " "

(3)

[parsing started .\outils\Calcul.java] [parsing completed 0ms] [wrote Essai.class] [checking outils.Calcul] [wrote .\outils\Calcul.class] [total 250ms] 7 + . / 8 0 ,, 3 , 6 , 6 / 8 " 0 • + 6 , + . / 0 2 = ? + ++, ++ + . / 2 " 0

D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.class] [wrote Essai.class] [total 266ms] + & &( / 8 " 0 1 ,, & +, + . @ , + . / 8 0 + 1 , + ,. ? & , , , " . + . ,/ 8 8 0 - . . / 0 + ' , 1 & !89 8 9 8: 3 & ,+ 7 +

& & & , -5??95:A

-5??95:A & . ' 1 . . . + . , , + . & ? & ,+ -5??95:A ,+ 1 . . , & B + -5??95:A ++ ! D:\Progs\JavaProgs\Tests>set CLASSPATH=D: D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

(4)

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] Essai.java:6: package outils does not exist

outils.Calcul un_calcul = new outils.Calcul(); ^

Essai.java:6: package outils does not exist

outils.Calcul un_calcul = new outils.Calcul(); ^ [total 234ms] 2 errors 7 + . / C 0 3 ,"' ' , / !89 8 9 8: 8 0 1& < & ! / 4 0 2 ++ . . , / !8 0 / ! 0 . , -5??95:A 5" ' , , -5??95:A ! D:\Progs\JavaProgs\Tests>set CLASSPATH=D:;. D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.class] [wrote Essai.class] [total 265ms] - + . / 0 , " , ) D ! , , + -5??95:A , & + , , 2 ++ -5??95:A . & ) ' " 1 ( & E 3 ) ( + . & ) ( 1, ,+ -5??95:A ! & / 6 .0 "

(5)

2++ + . / 2 " 0 + + .

# + 6 & / 6 .0

D:\Progs\JavaProgs\Tests>set CLASSPATH=D:

D:\Progs\JavaProgs\Tests>javac -verbose -classpath . Essai.java [parsing started Essai.java]

[parsing completed 32ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.class] [wrote Essai.class] [total 235ms] 7 , + & -5??95:A + F ' + ' & / 6 .0 B & / 6 .0 . ++ -5??95:A ! D:\Progs\JavaProgs\Tests>set CLASSPATH=.

D:\Progs\JavaProgs\Tests>javac -verbose -classpath d: Essai.java [parsing started Essai.java]

[parsing completed 32ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] Essai.java:6: package outils does not exist

outils.Calcul un_calcul = new outils.Calcul(); ^

Essai.java:6: package outils does not exist

outils.Calcul un_calcul = new outils.Calcul(); ^ [total 219ms] 2 errors D ! - " , 7 , , & . / !8" 4 G H 8" 8 8 " 0 + " ? - . . & ' > , 1 -5??95:A & / 6 .0

(6)

• - ' " + . / " 0 , / 2 " 0 I 6 6

/ " 0 & ( , B 4 + =

7

B + ' , + . " !

package outils; public class Calcul {

public int somme(int x,int y) {

return x+y+1; }

}

D / 2 " 0 !

D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.java]

[parsing started .\outils\Calcul.java] [parsing completed 0ms] [wrote Essai.class] [checking outils.Calcul] [wrote .\outils\Calcul.class] [total 265ms] - + . / 8 " 0 ,, , - + . / " 0 / 0 , & , ' 9 ,+ + . + . ( , > , • J6 6 6 ' = 7 B + ! package outils; public class Calcul {

public int somme(int x,int y) {

(7)

return x+y+new GenerateurValeur().valeurBizarre(); } } 2 , K ; , + . / 8K ; " 0 ! package outils;

public class GenerateurValeur {

public int valeurBizarre() {

return 3; }

}

7 + . ( " 2 " !

D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.java]

[parsing started .\outils\Calcul.java] [parsing completed 0ms]

[wrote Essai.class] [checking outils.Calcul]

[loading .\outils\GenerateurValeur.java]

[parsing started .\outils\GenerateurValeur.java] [parsing completed 0ms] [wrote .\outils\Calcul.class] [checking outils.GenerateurValeur] [wrote .\outils\GenerateurValeur.class] [total 281ms] 5 & , ! D:\Progs\JavaProgs\Tests>java Essai Un essai... 12 7 . + . / 8K ; " 0 ! package outils;

public class GenerateurValeur {

public int valeurBizarre() {

return 0; }

(8)

}

7 / 2 " 0 !

D:\Progs\JavaProgs\Tests>javac -verbose Essai.java [parsing started Essai.java]

[parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading .\outils\Calcul.class] [wrote Essai.class] [total 265ms] - & ,' + . / 8 " 0 / 8 0 2 " 3 &( / 8K ; " 0 + . , 2 ? ' & , ! D:\Progs\JavaProgs\Tests>java Essai Un essai... 12 5 , ! - , + , , & , ' " + & & 5 L 6 , B 4 + + MB -• 2 6 , + . + . ( & > , = # 2 K ;

(9)

- + ! 6 + . / 0 > , + . / " 0 6 / 0 / " 0 > , , & + . & , ; ( & ++ . ) 7 , ' , & ( ) + . ! 7 , , / 0 & . + . / 0 , / 0 7 + . ,, 6 , , / 0 & , , / !89 8 9 0 7 !

D:\Progs\JavaProgs>javac -verbose -sourcepath src -classpath exec src\Essai.java -d exec

[parsing started src\Essai.java] [parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] !89 8 9 2 " " 2

(10)

[loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading src\outils\Calcul.java]

[parsing started src\outils\Calcul.java] [parsing completed 0ms] [wrote exec\Essai.class] [checking outils.Calcul] [wrote exec\outils\Calcul.class] [total 281ms] D + + . !

D:\Progs\JavaProgs>javac -verbose -sourcepath src -classpath exec src\Essai.java -d exec

[parsing started src\Essai.java] [parsing completed 31ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading exec\outils\Calcul.class] [wrote exec\Essai.class] [total 250ms] 7 + + . / 8 8 " 0 ! package outils; public class Calcul {

public int somme(int x,int y) {

return x+y+42; }

}

- 2 !

D:\Progs\JavaProgs>javac -verbose -sourcepath src -classpath exec src\Essai.java -d exec

[parsing started src\Essai.java] [parsing completed 63ms] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/Object.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/String.class)] [checking Essai] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/lang/System.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/PrintStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/FilterOutputStream.class)] [loading C:\j2sdk1.4.2_02\jre\lib\rt.jar(java/io/OutputStream.class)] [loading src\outils\Calcul.java]

(11)

[parsing completed 0ms] [wrote exec\Essai.class] [checking outils.Calcul] [wrote exec\outils\Calcul.class] [total 313ms] - + . / 8 8 " 0 , 2 (, ! -& / 6 .0 & < + . 1 . -& / 6 .0 ' < + . ( -& / 6 0 & ' , + . ( > , ,, ? 4 6 , ,, - , + ) ' 13 & ,,

2 ,

- & , . ,+ . 1 , +, ++, ) , , , + .

N D

>,

• 2 , " 1 4 !

outils.Calcul un_calcul = new outils.Calcul();

& / 0 + . C (, + & ' + 7 ' + , ' & / 0 3 / 0 ' / 0 1 OO / 0 15 -& / 0 , , +

G -

?

" L ! . !CC" C" C G C C C% % C" . " L :. . ! . !CC" C" C G C C C% % C" . A % + ! . !CC" C" C G C C C+ . ? . .! . !CC" C" C G C C C% % C ..

Figure

Updating...

References

Related subjects :