/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// your code goes here
String str
= "I am a, JAVA programmer"; String[] splited
= str.
split("\\b+"); //split on space System.
out.
println("Search ram :"+ Arrays.
asList(splited
).
contains("ram")); System.
out.
println("Search I :"+ Arrays.
asList(splited
).
contains("I")); System.
out.
println("Search JAVA :"+ Arrays.
asList(splited
).
contains("JAVA")); System.
out.
println("Search g :"+ Arrays.
asList(splited
).
contains("g")); System.
out.
println("Search programmer :"+ Arrays.
asList(splited
).
contains("programmer")); }
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCS8vIHlvdXIgY29kZSBnb2VzIGhlcmUKCQlTdHJpbmcgc3RyID0gIkkgYW0gYSwgSkFWQSBwcm9ncmFtbWVyIjsKCQlTdHJpbmdbXSBzcGxpdGVkID0gc3RyLnNwbGl0KCJcXGIrIik7IC8vc3BsaXQgb24gc3BhY2UKCQkgU3lzdGVtLm91dC5wcmludGxuKCJTZWFyY2ggcmFtIDoiKyBBcnJheXMuYXNMaXN0KHNwbGl0ZWQpLmNvbnRhaW5zKCJyYW0iKSk7CgkJIFN5c3RlbS5vdXQucHJpbnRsbigiU2VhcmNoIEkgOiIrIEFycmF5cy5hc0xpc3Qoc3BsaXRlZCkuY29udGFpbnMoIkkiKSk7CgkJIFN5c3R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