+ 1

How to check the given string keyword or not in java

Please any one tell me this is my work

21st Dec 2019, 3:08 PM
GANI LAKSHMI BHERI
GANI LAKSHMI BHERI - avatar
4 Respuestas
+ 2
You can use this: import javax.lang.model.SourceVersion; SourceVersion has a isKeyword() method. read a string, than: System.out.println(Sourceversion.isKeyword(YourString); If the String contains a keyword: true else false
21st Dec 2019, 8:34 PM
Denise Roßberg
Denise Roßberg - avatar
21st Dec 2019, 4:08 PM
Avinesh
Avinesh - avatar
0
Is this code will used to print the given string is key word or not
21st Dec 2019, 3:27 PM
GANI LAKSHMI BHERI
GANI LAKSHMI BHERI - avatar