打包应用程序;
导入 java.util.Scanner; 导入 java.util.UUID;
公共类 AccountThis { 私有静态扫描仪扫描仪;
public static void main( String[] args ) {
//name input
scanner = new Scanner( System.in );
System.out.print( "Type your name: " );
String nameInput = scanner.nextLine();
System.out.println("Hello" + " " + nameInput);
//deposit input
scanner = new Scanner( System.in );
System.out.print( "Type how much you want to deposit:" );
double depositInput = scanner.nextDouble();
System.out.println("you want to deposit" + " " + depositInput + "$");
public AccountThis(String id) {
System.out.println("ID Generated"
+ "Please Write it down :" + id);
}
class RandomStringUUID {}
public id = randID;{
UUID randID = UUID.randomUUID();
UUID randomUUIDString = randID;
System.out.println(randomUUIDString );
new AccountThis( nameInput, depositInput, id);
}
{
}
}
public AccountThis() {
System.out.println( "created an account." );
}
public AccountThis( String nameInput ) {
System.out.println( " created account with name " + nameInput );
}
public AccountThis(double depositInput) {
System.out.println(depositInput + "$" + "added to your account!" );
}
}
我是 Java 新手,我正在尝试获取 id 并将其分配给带有一些文本的控制台,如您所见,如果您能帮我弄清楚,我会失败一点,我会非常高兴
顺便说一句,我称它为 id,因为我整晚都在使用它,但无法弄清楚。
偶然的你
相关分类