Answer to Question #20031 in Java | JSP | JSF for nohra
57-8. Write a method that returns true if an array of Strings contains the String "Hellofalse otherwise.
1
2012-12-05T10:29:51-0500
private static boolean StringsContains(){
boolean glag=false;
String [] arrayofStrings={"sadsdsd","Hellofalse
otherwise"};
for(int i=0;i<arrayofStrings.length;i++){
if(arrayofStrings[i].equals("Hellofalse otherwise")){
glag=true;
break;
}
}
return glag;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
JavaJSPJSF
Comments
Leave a comment