#New to netbeans java need help with two questions
1 messages ยท Page 1 of 1 (latest)
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
public String removeFirstTwoChars(String str) {
if (str.length() < 2) {
return str;
} else if (str.charAt(0) == 'f') {
return "f" + str.substring(2);
} else {
return str.substring(2);
}
}
//2) Write a method that will take in a string and return true if the string contains the word "java" regardless of case, false otherwise.
public boolean containsJava(String str) {
String lowerCaseStr = str.toLowerCase();
return lowerCaseStr.contains("java");
}
what exactly do you need help with