#what happened here? and how? and are there other ways to avoid this error? what are they?
33 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @weary whale! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
wasn't it working in your third picture ?
no one's going to be able to answer this to your satisfaction without explaning how fundamental logic works, the same logic you already know and use
how does it work?
how does... what work, a definition? are you asking about the internal structure or what
I'm confused what you are asking me right now. How does what work ?
how did this:
class Student { int rollno; String name; int marks; }
This message has been formatted automatically. You can disable this using /preferences.
solve the issue?
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
oh my god we're going in circles
because you defined what a Student is. Before you were just telling the compiler to use the type Student however, the compiler had no idea what student was because there is no class defined for it.
inb4 exact same thing happens as last thread 🍿
that's the purpose of classes?
to define variables?
classes are a structure. They logically bundle variables and methods together
check this out buddy
i remember you asking questions here, you were so much farther along, what happened
wonder if there's a way to define the variables under class array6
or do I always have to create separate classes?
and are there other options to define variables?
ah love it when you're blocked from giving links
@compact saffron just resend the link i gave it'll probably work lmao
you should always group variables and methods in logical bundles aka classes. If you have a class that has hundreds of responsibilities and variables to keep track of nobody, including you, is going to understand what you are coding. I wholeheartedly recommend the link above, the article will get you started with the basics.
he's not gonna see the link just resend it
alright thanks
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.