+ 1
JAVA
Java program https://sololearn.com/compiler-playground/cTk1sXu7L22D/?ref=app
3 Answers
+ 5
Pay attention to your spelling you need charAt(). You also should lower case the first letter of your variable: name instead of Name - but that won't give an error most of the time.
+ 1
Write below code for correct output
public class Program
{
public static void main(String[] args){
String Name = "Ali";
for(int i=0 ;i<Name.length();i++){
if(Name.charAt(i)=='l'){
System.out.println("true");
}else{
System.out.println("false");
}
}
}
}
0
thanks