#what does this mean??? i'm new and i have no idea
30 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @kindred crater! 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.
Needs imports. Also, is this class teaching inheritance without explaining imports? It might be a bit advanced if you’re just starting out. Might be worth going back and getting a solid standing with the fundamentals. A lot of courses are out there that let you do practice problems after teaching you something. One that I like is sololearn, but you’re limited in how many problems you can do without a subscription
what are imports
it just taught me booleans and if statements
Like, I was supposed to use booleans and logical statements to determine if something is true, then it prints it out
I think you may have skipped some lessons
I haven't, and I dont know what you mean by imports
imports allow you to use some code that is located somewhere else for the benefit of your project. Some imports don't need libraries (code you download and add to your project) in java these imports are usually java.net.<whatever>
say somewhere else in your project you have a square root function sqrt(int x)
but when you're coding in your main class if you type sqrt(int x) you wont be able to access that function because your code doesn't know about it
you would need to import <path to the class that contains desired function>
<classname>.sqrt(int x)
Got it. If you haven’t, I’d recommend a different course if possible, since it sounds like there’s a lot of the basics that this one isn’t teaching you
the course i'm taking was provided to me by a teacher, and it bsaically just teaches you things as you go
fore xampl;e, u learn printing
then smething like variables
then booleans
etc
it dosent show everyhting at once
yeah, so i have not touched base with that at all.
i was wondering if there was a way to solve it without using imports, just booleans and logical operators
and if statements if those are needed
no. it was written out for me alreayd.
basically they write all of the "class" and public run statements for you
u just gotta write the code that acutlaly functions
I don’t think I can do much without giving you the answer since you haven’t been taught enough basics to answer this question.
Id recommend some supplemental training. Sololearn is a good free option.