#field outside of Main

1 messages ยท Page 1 of 1 (latest)

unborn talon
stray salmonBOT
#

<@&987246487241105418> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question ๐Ÿค–. Maybe it helps! In any case, a human is on the way ๐Ÿ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

Of course! I'd be happy to help you with JavaFX or Swing. Can you please provide more details about what you need assistance with?

opaque delta
unborn talon
#

how do I do that ๐Ÿ˜…

#

I'm extremely new

past breach
#

see how ur Main class ends here, in line 7

#

u cant put code outside of classes

unborn talon
#

oh

past breach
#

ur code must be inside

unborn talon
#

how do I make a new class

stray salmonBOT
#

field outside of Main

#

Changed the title to field outside of Main.

past breach
#

what are u even trying to achieve?

unborn talon
past breach
#

tell me what u want to do and ill tell u how to do that

unborn talon
#

how do I make the class thingy come down so I can write the code

past breach
#

not sure what u mean by that

unborn talon
past breach
#

what sort of code do u want to write

unborn talon
#

In todays, Java Tutorial for Minecraft Modding, we are talking about Java Data Types. An essential topic to understand programming and working with Java!

== SUPPORT ME ON PATREON ==
โ–ถ๏ธ https://url.kaupenjoe.net/patreon

== ASSETS & DOWNLOAD LINKS ==
GitHub Repo: https://github.com/Tutorials-By-Kaupenjoe/New-Java-Introduction/tree/2-dataTypesA...

โ–ถ Play video
past breach
#

i bet the guide didnt tell u to do it like that

unborn talon
#

I want this to be here

unborn talon
past breach
#

that youtube video has everything inside the main method

#

not outside

#

and its int, not Int

#

id suggest u follow a "proper tutorial". we recommend mooc

stray salmonBOT
#

MOOC is a completely free introductory Java course created by the University of Helsinki, it is a great way to learn Java from the ground up.

It consists of two parts, one at beginner, and another at intermediate level. The end of the course is marked by creating your own Asteroids game clone!

Even though the instructions show how to configure and use NetBeans for the course, you can use IntelliJ. To use IntelliJ, simply install the TMC plugin by opening IntelliJ -> File -> Settings -> Plugins and searching for TMC. You will then be able to use IntelliJ to complete MOOC.

Visit MOOC here: https://java-programming.mooc.fi/
(the course is available in both English and Finnish)

About the course - Java Programming

unborn talon
#

oh

#

it dosen't work anymore I can't make a class

#

๐Ÿ˜ญ

past breach
unborn talon
#

I mean

#

the class

#

not the guide

past breach
#

see, ur problem is that ur doing stuff thats way ahead of ur current level without understanding what ur doing at all

#

ur doing random stuff

#

and that wont work at all

#

the youtube guide works. but ur not doing what they are doing

unborn talon
past breach
#

u either have to follow ur yt guide properly and do it like they do (then it also works)

#

or u learn it proper by following mooc instead

unborn talon
#

how do I fix my class?

past breach
#

but writing random stuff wont work

unborn talon
#

right now no code will work

#

because there is no end class

past breach
#

line 7 should be }

unborn talon
past breach
#

remove line 8

#

entirely

#

then it works

unborn talon
#

I want the int to work

#

the guide makes the int

past breach
#

but ur putting it at the entirely wrong place

#

and also writing it wrong

#

the guide makes the int inside the main method

#

not outside

unborn talon
past breach
#

and the guide also writes it as int points;

#

not Int. points;

unborn talon
#

oh

#

right

past breach
#

put it below the print line

#

before the closing }

#

so that its inside the method

unborn talon
past breach
#

u still put it outside

#

im repeating myself

#

ur main method ends in line 6

#

with that }

#

u have to put ur code inside

unborn talon
#

oh

#

not the class

#

but the method

past breach
#

yes

unborn talon
#

yay!

past breach
#

if u dont follow a proper guide u will be lost right on the next step though

#

and then on the step after that again

#

and so on

unborn talon
#

but I wanna learn java to make a minecraft mod

#

is mooc goingto help with that

past breach
#

hence i gave u a good resource to learn java

#

mooc is the best guide to learning java, in our opinion

#

before u can do minecraft mods, u have to learn java

#

minecraft requires u to have advanced java knowledge

#

otherwise its pain and suffering

#

ur not the first who comes here with that goal in mind

#

it happens pretty much once a week

unborn talon
#

oh well

#

mooc it is then

#

how much time do you think it will take me to get competent in java

past breach
#

from zero to junior job, its usually 2-3 years

unborn talon
#

I see

#

I'm following mooc and I don't need to change my program right?

#

can I just keep on using intellij

lone fractal
unborn talon
#

yay!

unborn talon
#

@past breach

#

I'm following the guide

#

the one you told me to

#

but it still errors

lone fractal
#

and it needs to be the same as the name of the file

#

Your class name is currently Main Ada Lovelace but it should be Main because your file is called Main.java

#

You need to follow the guide

#

Not just type about the same, but exactly as they do it

unborn talon
#

but it told me to

#

in the guide

lone fractal
#

It didn't tell you to name your class 'Main Ada Lovelace`

#

It told you to name your class 'AdaLovelace'

#

You can also watch the video above the exercise

unborn talon
#

and the video does not use

#

uh

#

intellij

lone fractal
#

File should also be named the same as your class

#

a class called Main needs to be in a file called Main.java

#

same for AdaLovelace in a file called AdaLovelace.java

unborn talon
#

can't I just not change the name

unborn talon
#

how do I edit this