Biblioteca Java - Rev 26
Subversion Repositories:
public class ExempluSiruri {
public static void main(String[] args) {
String s1 = new String("Hello");
System.out.println("Sirul s1 este:"+s1);
String s2 = "Hello world!";
String s3 = s1 + s2;
if(s1.equals(s2)){
System.out.println("Siruri egale");
}
else{
System.out.println("Siruri diferite");
}
int k = s3.indexOf("Hel_lo");
System.out.println("Positia = "+k);
String s4 = s3.toUpperCase();
System.out.println(s4);
s1 = s4;
System.out.println(s1);
System.out.println(s4);
s1 = s1.toUpperCase();
System.out.println(s1);
}
}