lots of love from india to my bro❤❤
that 'a' relace is funny youn make fun all and amazing man
Thankyou brother 🙇
13/71, done!
13/71
public class Main { public static void main(String[] args) { String t = "this string is forty-one characters long!"; for(int i=0;i<t.length();i++){ System.out.printf("%c",t.charAt(i)); } System.out.printf("\n%d",t.length()); } }
First
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.printf("type your name(no spaces and 12 characters only):"); String name = sc.nextLine(); if (name.length() <= 12 && !(name.isEmpty())){ if(!(name.contains(" "))){ System.out.printf("you are good to go, %s",name); } else { System.out.printf("\nyour name contains spaces :: %s :: right way: %s", name, name.replace(" ","")); } } else { if(name.isEmpty()){ System.out.printf("\nyour name doesn't exist"); } else { System.out.printf("\nyour name is bigger than 12 characters"); } } sc.close(); } }
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter your Password (10 char max): "); String password = sc.nextLine(); int charamount = password.length(); boolean isEmpty = password.isEmpty(); if(isEmpty) { System.out.println("You haven't typed your Password."); } else if(charamount <= 10) { System.out.println("Password is complete."); System.out.println("Would you like to save your Password? (True/False)"); boolean pwsave = sc.nextBoolean(); if(pwsave) { System.out.println("Password succesfully saved."); } else { System.out.println("Password save is cancelled."); } } else { System.out.println("Password cannot contain more than 10 characters."); } sc.close(); } }
@BroCodez