-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment66_.java
More file actions
24 lines (16 loc) · 823 Bytes
/
Assignment66_.java
File metadata and controls
24 lines (16 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package abhilash_Asignments;
//WAP using charAt, indexofchar, subString- Single and double
public class Assignment66_ {
public static void main(String[] args) {
String UserName = "Abhilash.var5";
System.out.println("string output :- " + UserName);
char a = UserName.charAt(5); // for calling the exact char in the strig "variable.charAt" is used
System.out.println("string charat:- " + a);
String Username = "Automation";
int a2 = Username.indexOf('n'); // for calling the exact index number with the help of char
System.out.println("String indexat:- " + a2);
String course = "ManualTesting";
String c1 = course.substring(6, 10); // this is used to call the between char or string with the help of indexing number
System.out.println("sub string of string output :- " + c1);
}
}