Guest User

Untitled

a guest
Jul 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. boolean p=str.contains("R");
  2. if(p)
  3. System.out.println("string contains the char 'R'");
  4. else
  5. System.out.println("string does not contains the char 'R'");
  6.  
  7. boolean p = str.toUpperCase().contains("R");
Add Comment
Please, Sign In to add comment