String str = "Hellow";System.out.println(str.indexOf('t));
public class CheckPositiveOrNegativeExample1{public static void main(String[] args){//number to be checkint num=912;//checks the number is greater than 0 or notif(num>0){System.out.println("The number is positive.");}//checks the number is less than 0 or notelse if(num<0){System.out.println("The number is negative.");}//executes when the above two conditions return falseelse{System.out.println("The number is zero.");}}}