public class ex3 public static void main String args char String Home

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public class ex3{
public static void main(String [] args){
char a='2';
String b=" Home sweet homeа";
char c=b.charAt(1);//=Н
String d=(b.endsWith("a"))?"var b ends with a":"var b not ends with a";
String e=b.substring(5);
String f=b.toLowerCase();
String g=b.toUpperCase();
String h=b.trim();//убрать пробелы вокруг выражения
System.out.println("a = " + a);
System.out.println("b = " + b);
System.out.println("c = " + c);
System.out.println("d = " + d);
System.out.println("e = " + e);
System.out.println("g = " + g);
System.out.println("h = " + h);
}
}