The guy that invented Java must’ve been already a bit tipsy when he defined the From end To index stuff for filling arrays. Who the hell defines the from to be the real index but the To to be the index +1?
@a.human.3 жыл бұрын
you stole the words from my mouth lol!
@saarza9991 Жыл бұрын
It's very easy to judge a person's work from these minute details. As someone who works in the field for more than 15 years, I see why they did that. In almost every language, you will have the same convention, hence the reason. Now, you don't want different rules for each language, do you? That'd end up pretty badly
@hassanabdikadir15964 жыл бұрын
I really appreciate Neso Academy. For this wonderful course. Looking forward for the installation of oop soon. Thank you
@suheabkhan25464 жыл бұрын
Nyc lecture sir... From when onwards oop is getting started
@kruthikln92664 жыл бұрын
Please upload the full videos
@alfatihqayumi3414 Жыл бұрын
thank you very much !! sir do you have any javascript learning class in youtube or if you have please send me that link .
@rishurana9944 жыл бұрын
Hi, sir i have a doubt, please help me! As the fill function starts as follows int [ ] n2= new int[6]; Arrays.fill(n2, 3, 5 , 7); The output is : 0,0,0,7,7,0 but if we follow index counting, as it has done for printing 3(as 3 is at 4th place) the output should be Output: 0,0,0,7,7,7,0. OR the output should be (not following index counting) Output : 0,0,7,7,7,0. please help me out, Sir.
@joeschmoe75633 жыл бұрын
For some reason the toIndex number is not inclusive, meaning it won't go until 5 as in the example you provided. If you want to fill up your array from index 3 to 5 you should use the method like this -> Arrays.fill(n2, 3, 6, 7); and you will get the desired result. Just remember that for the toIndex portion just go one number higher than what you want.