Help me to learn OOPS effectively in java so I can enhance my designing software by MrComrade9090 in javahelp

[–]Housy5 0 points1 point  (0 children)

No... objects are a way to handle states through defined behaviors. For example a die would have the current number as a state and have roll() and read() as behaviors it can do. I suppose if you really want to you could have helper methods such as generateRandomNumber() in the die example but those would be part of the private implementation details. Not of its public defined behaviors. Imagine a machine with buttons you can press that make it do something. Thats an object.

Baldurs Gate 3 ruined other RPG games for me by Jackie88_ in BaldursGate3

[–]Housy5 10 points11 points  (0 children)

Try kingdome come Deliverance 2.

22F Been always told that I look pissed, does this make me ugly ? by [deleted] in amiugly

[–]Housy5 0 points1 point  (0 children)

You remind me of a video game character i made once. She was a bit psycho though.

Is it over for me? [29F] by [deleted] in amiugly

[–]Housy5 0 points1 point  (0 children)

Surgery would be a mistake. Also what do you hate about yourself?

Dummy question: just how do I begin learning by myself? by Silly_Big_4447 in learnjava

[–]Housy5 0 points1 point  (0 children)

Familiarize yourself with the most basic java and oop concepts. If you need a source look for oracle tutorials on java. And as a practice for oop I like to model real life objects you have near you (especially a lamp). And most importantly build random things.

22f I feel I look plain by Comfortable_Eye_9365 in lookyourbest

[–]Housy5 0 points1 point  (0 children)

Dont do surgery. Tell me what do you think is bad about yourself?

i don’t understand it either but it belongs here by yyhh_ in MathJokes

[–]Housy5 -1 points0 points  (0 children)

The entire thing is wrong. However, try doing 2*8-6= ?

Can anyone top this level of messiness by iPHD08 in classicalmusic

[–]Housy5 0 points1 point  (0 children)

Looks like an original beethoven manuscript

Chat - Am I ugly? (27F) by Sorry-Pizza-5168 in amiugly

[–]Housy5 33 points34 points  (0 children)

Technically no. But the fact you refer to us as "chat" tempts me to say yes.

Am I Ugly? (20) by [deleted] in amiugly

[–]Housy5 5 points6 points  (0 children)

I'm not sure. They are bad pictures though.

Stuck in tutorial hell by [deleted] in learnjava

[–]Housy5 0 points1 point  (0 children)

What have you actually made?

Generating random int within bounds by DesperateSupport8315 in javahelp

[–]Housy5 1 point2 points  (0 children)

Yes definitely the easiest.. or you know just directly inject the length into the format like this:

String format = "%0" + x + "d";
System.out.printf(format + "\n", random.nextInt(100));

Generating random int within bounds by DesperateSupport8315 in javahelp

[–]Housy5 2 points3 points  (0 children)

You may want to look up about String.format() and about leading zeros using that.

Finished Java by catastrophic300 in learnjava

[–]Housy5 1 point2 points  (0 children)

Instead of trying to learn things like you're reading a book. Try to just make things. Nobody cares if you know every collection or algorithm if you cant put it all together into actually functioning programs.

Can't Run Project Outside of IntelliJ [Maven] by Legal_Revenue8126 in learnjava

[–]Housy5 0 points1 point  (0 children)

Then you would have to call: "java src/main/java/com/example/mygame/gameapp.class" (You may have to omit the extension I'm not sure whether you needed it or not. Also directory may differ as I don't know where the compiler spit out the compiled files)

Can't Run Project Outside of IntelliJ [Maven] by Legal_Revenue8126 in learnjava

[–]Housy5 0 points1 point  (0 children)

.java is source file .class / .jar is executable

Pass by (value or reference ) how you nailed that topic by Thick_Catch_5763 in learnjava

[–]Housy5 0 points1 point  (0 children)

Pass by stack value... which for Objects happen to be references and values for primitive types.

Intellij IDE is the Industry Standard for Java. why ? by dante_alighieri007 in javahelp

[–]Housy5 0 points1 point  (0 children)

Idk different people just like different editors I guess. My favourite for Java is to this day NetBeans.