+ 1

Need solution

What are the error in that code? public class Program { public static void main(String[] args) { Teacher teacher1 = new Teacher(); teacher1.name = "Tommy"; teacher1.gender = "male"; teacher1.phone = 0987543; System.out.println("Name= "+teacher1.name); System.out.println("Gender = "+teacher1.gender); System.out.println("Phone = "+teacher1.phone); } }

18th Aug 2022, 11:09 AM
Mustakim Rahman
Mustakim Rahman - avatar
9 Answers
0
Thanks a lot brother #abpatrick_catkilltsoi But you know what ,there are some bugs also running at sololearn app. Developers also try hard enough to solve those. However, thanks for helping.
19th Aug 2022, 5:57 AM
Mustakim Rahman
Mustakim Rahman - avatar
0
brother i cannot understand. Can you explain?
18th Aug 2022, 11:17 AM
Mustakim Rahman
Mustakim Rahman - avatar
0
Create teacher class like this: class Teacher { public string name; public string gender; public int phone; } I still cannot get any output. It shows some error.
18th Aug 2022, 11:21 AM
Mustakim Rahman
Mustakim Rahman - avatar
0
OK, Oracle/Windows/Photoshop also has a lot of bug, so you are as good as them.
19th Aug 2022, 8:59 AM
abpatrick catkilltsoi
abpatrick catkilltsoi - avatar
0
Brother i’m not joking. Cause in jdk or netbeans when you type "string" it autometically convert to "String". But in sololearn it doesn’t. It is all about capital (S) and small (s). That's the main thing. However ,thanks again for helping.
19th Aug 2022, 1:16 PM
Mustakim Rahman
Mustakim Rahman - avatar
0
OK, ide will create class for you with AI automatically too, copilot or GPT4 will replace your job soon. May be
it would be better to learn household bug removal than dealing with the automatic capital bug.
19th Aug 2022, 1:45 PM
abpatrick catkilltsoi
abpatrick catkilltsoi - avatar
0
You should your program instead of Teacher
19th Aug 2022, 2:00 PM
Durga Prasad
Durga Prasad - avatar