Learn Programming in Java - Lesson 12 : Arrays

preview_player
Показать описание
In this lesson we introduce arrays. We'll explain their purpose and why you want to use them. Through examples, we will demonstrate how to declare, index and enumerate over arrays of basic data types and well as complex arrays of objects.
Рекомендации по теме
Комментарии
Автор

I never thought of storing instances in arrays. That's kewl Sauce

TraceguyRune
Автор

Hi Mike, I tried to use the nextLine() of the Scanner to read the label in the ASCIBarChart example but it was not working as expected, when i checked the solution I found that you have used the next() method which solved the problem when I used it .. I checked the differences between both methods however I still don't understand why would the nextLine() method cause this issue.. if you have an explanation kindly share with us.

hythamelsohl
Автор

I was trying to use printf, but it says d != java.lang..String. Can you please explain how I can use printf to print out the %d, %s, %f etc. I would be very happy if you explain the issue here

anwarabegum
Автор

Hii...
I want to create a charecter array and want to add user input charecters to that array.
Please help me solving this. I am able to create integer, string arrays and add user inputs with the help of scanners nextInt, next functions. But i am not able to find the solution for character array

aishwaryaprakash
Автор

for(int s : this.scores) {
     highest = s > highest ? s : highest;
}
//and
for (DataPoint d : dp){
      d.plot();
}
//can you explain this for loop? I just wonder how it works?
I got that codes in your ChallengeActivities. *sorry for my bad english

paulaldrichnievas
Автор

Hi Michael, thank you for the awesome video!
Is it okay if you upload a video explaining how to sort a .text file into a parallel arrays? Like if we have a list of 50+ student Names and Grades in a .text file, how would we go about to sort and put into a parallel arrays?

Narmar
Автор

hello sir..thank you for the vids..is your code on github???

lucioiams
Автор

I dont get it. What does it actually mean ?
for(int a : array) {
max = a > max ? a : max;
}

xbogon
Автор

MTHRFCKR, i love your vids, thank you very much, the way you explain Java is epic, EPIC

JediKnightOnlylwdb
Автор

Hi Michael, Nice work man.
One question. While initializing Arrays when using CLASSES... why have you used NEW keyword?? As far as I've understand, NEW keyword is used when to Make a new Object from some class.
for example. 
You created a class of STUDENT having Private properties of GRADES and NAME... yeah.
then you made an object students using Student[] students = new Student[];
and then initializing them students[0] = new students("tom", 77)   and  students[0] = new students("ed", 84) and so on.

Please guide on this....

And i don't comment much normally .. I also wanted to ask you ... Where can we find some practice projects to master our skills in programming.... I'm doing the Challenge activities and stuff of yours... 

and 10/10 on your way of describing ... RESPECT 

faizanmunir
Автор

Hi Micheal! Thanks for the great course, so far learning goes silky smooth and Java feel much more "programmer friendly" then C++ which I was studying on my university. I just have a question regarding one line of code in one of the challange activities. What does this formula in the for loop mean?

public int Highest() {
int highest = -1;
for (int s : this.scores) { // this formula
highest = s > highest ? highest : s;
}
}

I understand how the whole loop and method work.

moher