Answer:
(s.charAt(0) != s.charAt(s.length()-1))
Explanation:
public class Palindrome
{
public static void main(String[] args) {
System.out.println(isPalindrome("car"));
System.out.println(isPalindrome("carac"));
}
public static boolean isPalindrome(String s) {
if (s.length() <= 1)
return true;
else if (s.charAt(0) != s.charAt(s.length()-1))
return false;
else
return isPalindrome(s.substring(1, s.length() - 1));
}
}
You may see the whole code above with two test scenarios.
The part that needs to be filled is the base case that if the character at position 0 is not equal to the character at the last position in the string, that means the string is not a palindrome. (If this condition meets, it checks for the second and the one before the last position, and keeps checking)
Answer: 3/5 or 0.6m
Explanation:
frecuencia (f) = 550Hz
velocidad del sonido en el aire (v) = 330m/s
velocidad =frecuencia × longitud De onda(λ)
v = fλ
330 = 550 × λ
λ = 330 / 550
λ = 3/5
λ = 0.6m
Answer:
Indonesia's capital has just been relocated from Jakarta to a site within the jungle of Kalimantan on Borneo island after parliament approved the bill. It will strengthen supply chains and place Indonesia "in a more strategic position in world trade routes, investment flows, and technological innovation."
Explanation:
mark as brainiest
Answer:
So, you can have a whole view, if you cover your right eye, you can't really see anything to your right just towards your left.
Explanation:
Answer:
A. for an if-else statement in python, if the condition is false, The else statement is executed.
B. if the condition of the if-statement is true, the indented block of code is executed.
Explanation:
The if-statement is a conditional statement in programming for decision making. It is also known as branching as it makes decisions based on two paths. It comes with another keyword called 'else'.
The If-else statement makes a decision based on the output of a condition which is defined in the if-statement. If the condition is met, the code block just after the if-statement is executed, but the else-statement block is executed if otherwise.