Technical Solutions
Tuesday, 7 May 2019
get email first part in java
class
Main {
public
static
void
main(String[] args) {
String email=
"pawan@gmail.com"
;
Integer index=email.indexOf(
'@'
);
String name=email.substring(
0
,index);
System.out.println(
"Hello world!"
+name);
}
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment