-
This Java String contains examples shows how to use contains method of Java String class.*/public class JavaStringContains {public static void main(String args[]){String str1 = “Hello World”;String str2 = “Hello”;
/** To check whether the string contains specified character sequence use,* boolean contains(CharSequence sq)* method of Java String class.** This method returns true if the string contains given character sequence.* Please note that contains method is added in Java 1.5*/boolean blnFound = str1.contains(str2);System.out.println(“String contains another string? : “ + blnFound);
/** Please also note that the comparison is case sensitive.*/}}
/*Output of Java String contains example would beString contains another string? : true*/
Friday, 13 April 2018
Popular Posts
-
Advantages of Object Oriented Programming Object oriented programming has several advantage to the programmer and user. Through inheri...
-
Build interactive, data-driven websites with the potent combination of open-source technologies and web standards, even if you have only ...
-
What is Python? → Python is an interpreted High level programming Language for General purpose programming. Python is created by Gui...
-
Activity_main.xml File <? xml version= "1.0" encoding= "utf-8" ?> < LinearLayout xmlns: android = &qu...
-
Java :- It is a fast, secure and reliable general purpose computer programming language. Python :- A Readable, efficient and powerfu...
-
Python is a high-level programming language that is widely used in various kinds of programming activities. Python is known for its objec...
-
Business Analytics Definition "Study of business data using statistical technique and programming for creating decision suppo...
-
Variables in R A variables are nothing but reserved memory locations to store values. This means that when you create a variab...
-
Procedure Oriented Programming Language:- High level language such as COBOL , FORTRAN AND C is commonly known as procedure oriented progr...
-
➤Each family of processes has its own set of instructions, the set of instructions are called machine instructions ➤A processor underst...

Categories
Android
(22)
AngularJS
(1)
Assembly Language
(2)
Books
(10)
C
(75)
C#
(6)
C++
(81)
Course
(1)
Data Strucures
(4)
Downloads
(1)
Engineering
(13)
flutter
(1)
FPL
(17)
Hadoop
(1)
HTML&CSS
(38)
IS
(25)
Java
(87)
Leet Code
(4)
PHP
(20)
Projects
(1)
Python
(218)
R
(69)
Selenium Webdriver
(2)
Software
(14)
SQL
(27)

ReplyDeletenice article for beginners.thank you.
javacodegeeks
welookups java