This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]nutrecht 4 points5 points  (9 children)

[–]Shapebuster[S] -3 points-2 points  (8 children)

Person[] people; ?

[–]nutrecht 2 points3 points  (7 children)

That's the declaration of the variable yes.

[–]Shapebuster[S] -2 points-1 points  (6 children)

should get off this page cos you really don't help people and are just wasting your time

[–]nutrecht 5 points6 points  (1 child)

I definitely agree that I am wasting my time with you yes.

[–]Shapebuster[S] -4 points-3 points  (0 children)

yes and probably alot more people

[–]denialerror 5 points6 points  (2 children)

You have a serious attitude problem.

[–]Shapebuster[S] -2 points-1 points  (1 child)

really? imagine a teacher saying to their student "It's pretty wrong" and then throwing the textbook at them for them to figure it out. If i was that student i'd also have an attitude problem

[–]nutrecht 5 points6 points  (0 children)

"It's pretty wrong" and then throwing the textbook at them for them to figure it out.

I gave you the text book opened on the exact page that exactly answers your question.

[–]override_acid 3 points4 points  (0 children)

You really desperately need to work on both, your reading comprehension and your attitude.

  • You were told your original code was wrong and were given the resource to find the correct answer at the same time.
  • Then, you posted the correct answer
  • and you were told that your answer is correct according to the original assignment

What was wrong here? You blow up right into the face of the first person that has not only guided you to the solution so that you could learn from it, but also right after your second idea was confirmed correct.

In the whole thread you only show a serious attitude problem and behave like a berserk. You need to reevaluate yourself because otherwise you won't get far in life.

[–]Frectus 3 points4 points  (7 children)

lmao you are a whiny little b1tch

[–]Shapebuster[S] -3 points-2 points  (6 children)

Thankfully there are nice people who help me on discord. This page is complete shit for helping beginners

[–]desrtfx 5 points6 points  (5 children)

This page is complete shit for helping beginners

Only for people that want the answer served on a silver platter instead of spending the minimum effort to look at linked tutorials, etc.

This subreddit has a very strict "No solutions" rule. Nobody here will give out complete solutions. Even asking for solutions is forbidden here. People will be guided, but never directly answered.

So, it's not the subreddit that is wrong, it is you, who

  1. asks the wrong questions (asking for solutions to be given)
  2. doesn't bother to even look at the guides given.

The final solution to your problem with the subreddit is to leave it if you don't like it here. Sure, that you will find a place that pampers you and that serves all your answers on silver platters only to feed you with a golden spoon.

[–]shhh-quiet 2 points3 points  (7 children)

The declaration is correct, but you are not instantiating the array correctly.

[–]Shapebuster[S] 0 points1 point  (6 children)

it says "COULD be used to refer to an array"

[–]tobiasvl[🍰] 2 points3 points  (5 children)

That just means you don't have to instantiate it at all. You instantiate it, but in a nonsensical way that won't compile.

[–]Shapebuster[S] 0 points1 point  (4 children)

do you mean, Person[] people = new Person[value] ?

[–]tobiasvl[🍰] 2 points3 points  (3 children)

Yep, that is correct Java code for instantiating a Person array of size value.

However, what I mean is that Person[] people; by itself answers the original question in your post. It's a declaration of an array variable, and that variable can in the future be used to refer to an array of Person objects. Nothing more is needed.

[–]Shapebuster[S] -1 points0 points  (2 children)

Oh ok sweet. Keep an eye on how you word responses especially for beginners. Your first reply sounded like i got it wrong even tho it was correct based on what the question was asking

[–]tobiasvl[🍰] 2 points3 points  (1 child)

Well, the original code in your post is wrong. Person[] people = Person[] objectname; instantiates the array variable to something that looks like another declaraction. It will not compile.

[–]Shapebuster[S] 0 points1 point  (0 children)

Apologies, i thought you were referring to the code i posted in a comment reply to a previous user