Biblioteca Java - Blame information for rev 4
Subversion Repositories:
Rev | Author | Line No. | Line |
---|---|---|---|
4 | mihai | 1 | package introducere.java; |
2 | |||
3 | |||
4 | public class Text { | ||
5 | public static void main(String[] args) throws Exception{ | ||
6 | String s1 = "abc"; | ||
7 | String s2 = "123"; | ||
8 | |||
9 | System.out.println(s1+s2); | ||
10 | String s3 = new String("23"); | ||
11 | |||
12 | if(s1.equals(s2)){ | ||
13 | System.out.println("Siruri egale!"); | ||
14 | } | ||
15 | else{ | ||
16 | System.out.println("Siruri diferite"); | ||
17 | } | ||
18 | |||
19 | int x = Integer.parseInt(s2); | ||
20 | int y = Integer.parseInt(s3); | ||
21 | int z = x + y; | ||
22 | System.out.println(z); | ||
23 | } | ||
24 | } |