Java code don't working and I dont Now why help | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Java code don't working and I dont Now why help

Hi guys i new on programing and try to learn JAVA for make Android Application i started write consle code. But here code Stop and I dont Now why. Its stopped on try { . you Can try It : https://code.sololearn.com/cXrBflxhe2tX/?ref=app https://code.sololearn.com/cYtQP5VVd2OZ/?ref=app

6th Nov 2020, 3:29 PM
Abdelkrem0
5 Answers
+ 1
Your code is incomplete. Please include imports and public class Program{ public static void main(String[] args) {
6th Nov 2020, 3:36 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
i am sorry first code method i called from main method I edit It to work in second code
6th Nov 2020, 3:50 PM
Abdelkrem0
0
"data" is an invalid type. Please describe what your code should do
6th Nov 2020, 3:59 PM
Benjamin Jürgens
Benjamin Jürgens - avatar
0
with this your first code works, but what format do you really use to store your password? I don't think it's: "A.passwordUser_passwordA.password" file: [email protected] A.passwordUser_passwordA.password account not deleted; //---------- import java.util.Scanner; import java.io.*; class A { static String pass1; //email static String password = "A.passwordUser_password"; static Scanner scan = new Scanner("[email protected]\n0\n"); // System.in); static void setpass1() { pass1 = scan.nextLine(); } } public class P20201107_tst_for_login { P20201107_tst_for_login myprog; public static void main(String[] args) { var p = new P20201107_tst_for_login(); p.myprog = p; p.login(); } void sta() { System.out.println("sta()"); System.exit(0); } void account() { System.out.println("account()"); System.exit(0); } public void login() { ... } }
7th Nov 2020, 4:17 AM
zemiak
0
Thanks guys i solved
8th Nov 2020, 8:51 AM
Abdelkrem0