Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
contains() - String in java - CodeGK
Δ Java References
String
charAt()
codePointAt()
codePointBefore()
codePointCount()
compareTo()
compareToIgnoreCase()
concat()
contains()
contentEquals()
copyValueOf()
endsWith()
equals()
equalsIgnoreCase()
indexOf()
isEmpty()
lastIndexOf()
length()
replace()
startsWith()
toLowerCase()
toUpperCase()
trim()
Math
acos()
asin()
atan()
atan2()
cbrt()
ceil()
copySign()
cos()
cosh()
exp()
expm1()
floor()
hypot()
IEEEremainder()
log()
log10()
log1p()
max()
min()
pow()
random()
rint()
signum()
sin()
sinh()
sqrt()
tan()
toDegrees()
toRadians()
♦ contains() - String
♣ Example1: contains()
Input:
Run CODE
Reload Code
Copy Code
public class MyClass { public static void main(String[] args) { String str1 = "Hello World, "; String str2 = "Yo Folks"; String str3 = ", What's up"; System.out.println(str1.contains("Wo")); System.out.println(str2.contains("Fo")); System.out.println(str3.contains("UP")); } }
Output: