-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstrings.java
More file actions
90 lines (87 loc) · 2.08 KB
/
strings.java
File metadata and controls
90 lines (87 loc) · 2.08 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
import java.util.*;
public class strings {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String name = sc.next();
String last = sc.next();
String fullname = name + " " + last;
System.out.println(fullname);
System.out.println(fullname.length());
for(int i=0; i<fullname.length(); i++){
System.out.println(fullname.charAt(i));
}
}
}
*/
/*
// compare of string
import java.util.*;
public class strings{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
String name1 = sc.next();
String name2 = sc.next();
if(name1.equals(name2)){
System.out.println("Strings are equal");
}else{
System.out.println("not equal");
}
}
}
*/
/*
//substring
//beg index o and ending index number.length()-1
public class strings{
public static void main(String args[]){
String name = "surujkalita";
System.out.println(name.substring(0 , 3));
}
}
*/
/*
public class strings{
public static void main(String args[]){
String str = "123";
int number = Integer.parseInt(str);
System.out.println(number);
}
}
*/
/*
public class strings{
public static void main(String args[]){
int number = 123;
String str = Integer.toString(number);
System.out.println(str.length());
}
}
*/
/*
import java.util.*;
public class strings{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int size = sc.nextInt();
String array[] = new String[size];
}
}
*/
/*
import java.util.*;
public class strings{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int size = sc.nextInt();
String array[] = new String[size];
int totlength = 0;
//input
for(int i=0; i<size; i++){
array[i] = sc.next();
totlength = totlength + array[i].length();
}
System.out.println(totlength);
}
}
*/