+ 2
Problem with netbeans
Hey guys,im just a beginner in programming. there is this simple java code i write on netbeans, and it keeps givin me nonsense errors and hints to fix. And it’s funny because that is the exact same code our teacher wrote on his pc and it was all ok and it ran on netbeans. Is it sth i should’ve done for installing it to avoid these errors?? What should i do? Pls let me know :(
27 Answers
+ 2
fixed it ...
there was more typos 😩
here is your code
https://code.sololearn.com/cN7y6b5eGM32/?ref=app
+ 3
please tell all the errors
what are they...
whats the console saying..
+ 3
You can provide your code and the error message which is occurring. We will be able to deduce something from there.
+ 2
send your code then....
+ 2
there was too many mistakes in your code (syntax and typos) I modified the code but It still have some problems because it doesn't print any output.. here is the code:
https://code.sololearn.com/c044A960EXdO/?ref=app
+ 2
pay attention to uper case and lower case letters. at one line u used an object in uper case and in another in lower case .......
and don't forget the curly braces 🙂
+ 2
My sister found it, i just added “static “ in the first public class !!!!
Thanks so much again for ur helps 🌺🌺
+ 1
for your if statements u didn't open curly braces??!
+ 1
copy this code in the coding ground and send it's link
+ 1
Thank u so much. 💕
Was that all??just typos and syntax erorrs? Oh my god that’s a shame ! 😓
But why it kept telling me to add some nonsense classes ? :|| it runs on sololearn coding ground
But i tried the fixed one u gave me on netbens, and again it has some errors :((((
+ 1
what error?
you copied the code in netbeans or wrote them down?
+ 1
I copied ur code in the correct places on netbeans, i mean the class is in its place and all.
+ 1
and what error happened?
+ 1
For the first if statement in the class student, it says the if statement is redundant
+ 1
hold on a minute....
I'm gonna try the code on eclipse......
+ 1
okay....
in eclipse (probebly in netbeans too) you must declare the classes (the program class and the student class )in separate files......
+ 1
if that's not the problem with your netbeans. u can send me a screenshot of code and error to my email or telegram
+ 1
The problem is just with these two lines :
S1=new student ();
S2=new student ();
Error : non-static variable this cannot be referenced from a static context
I googled the error, and read lots of answers but found nothing that could help me out
+ 1
well the code on eclipse had different problems . unfortunately I don't have netbeans.....
+ 1
What did it say on elipse??