Reversing the Values in an Array (Java Tutorial)

  Рет қаралды 32,007

Bill Barnum

Bill Barnum

6 жыл бұрын

This Java tutorial for beginners will explain and demonstrate an algorithm for reversing the values in an array.
Aligned to AP Computer Science A.
🔥 Subscribe To Get More Tutorials: bit.ly/36H70sy 🔥
#Java #JavaTutorial #JavaTutorials

Пікірлер: 53
@BillBarnum
@BillBarnum 4 жыл бұрын
📌 Subscribe For The Latest Videos: bit.ly/36H70sy 📌 . 💻 All Java Tutorials: bit.ly/JavaTutorialsKZbin 💻 . 🤖 Learn Java In 3 Hours: bit.ly/JavaIn3Hours 🤖
@MitchieWee
@MitchieWee 9 ай бұрын
As someone who learns by visualising I really appreciate this video. Help me not just understanding what i need to to but also WHAT i am doing. Thanks!
@f3rdi881
@f3rdi881 5 жыл бұрын
Without the visuals this would have been impossible to comprehend.
@user-lj7yy7gx3w
@user-lj7yy7gx3w 2 жыл бұрын
Great video , in terms of explanatory power , you actually shed light into how the code works step by step. Not so many youtubers delve into the details of the code . ( commenting as a begginer)
@BillBarnum
@BillBarnum 2 жыл бұрын
Thanks for the comment, Δημητρης. I'm glad you found the video useful!
@Gamuss12345
@Gamuss12345 8 ай бұрын
So far the best tutorial I've ever seen! Love this concept or explanation + visualisation! Thank you, Bill!
@dmitrykoveshnikov
@dmitrykoveshnikov 8 ай бұрын
Great video. THANK YOU
@JULIEDELARO
@JULIEDELARO 6 ай бұрын
Oooh I love this. I'm at the start of my software engineering degree program online. The instruction is basically read the book, now code. I don't learn that way. This helped. Subscribed.
@BillBarnum
@BillBarnum 6 ай бұрын
I'm glad you found it helpful!
@kingjulian1046
@kingjulian1046 4 жыл бұрын
Great explanation and visuals really made a complex idea easy to understand top stuff.
@mardavboy
@mardavboy 2 жыл бұрын
I am learning rn Arrays and this topic really hard on me but found your video and it helped me understand the logic behind the reverse exercise I had to make. thanks!
@BillBarnum
@BillBarnum 2 жыл бұрын
Thanks for the feedback, Mark! I'm glad you liked the video.
@Sami67995
@Sami67995 Жыл бұрын
step by step explanation and thanks for sharing
@NicolasEZapata
@NicolasEZapata 4 жыл бұрын
So clear I knew what to do by the middle of the video. Good Stuff Sir!
@sudelicious.4045
@sudelicious.4045 3 жыл бұрын
keep doing the visual, it helps me to learn this very clearly. thanks a lot!
@BillBarnum
@BillBarnum 3 жыл бұрын
Thanks for the feeback. I'm glad you found the video useful!
@gabrielmiyamoto3917
@gabrielmiyamoto3917 3 жыл бұрын
Life Saver! clear explanation Thank you!
@BillBarnum
@BillBarnum 3 жыл бұрын
Thanks for the feedback! I'm glad you found it useful.
@chrisbaisley5571
@chrisbaisley5571 3 жыл бұрын
Very helpful, thank you!
@BillBarnum
@BillBarnum 3 жыл бұрын
Thanks, Chris.
@PatrycjaMarkiewicz
@PatrycjaMarkiewicz Жыл бұрын
Great algorithm :)
@birkhansonkan4236
@birkhansonkan4236 6 жыл бұрын
visual explanaition is a great way of teaching, thanks
@bextrekks8354
@bextrekks8354 2 жыл бұрын
visual helped a lot - thanks!!
@BillBarnum
@BillBarnum 2 жыл бұрын
Thanks for the comment, Bex! I'm glad that you liked the video.
@syedghouseullah
@syedghouseullah Жыл бұрын
Thankyou sir 🙏
@yasinfahmy
@yasinfahmy 2 жыл бұрын
perfect, thanks!!!
@BillBarnum
@BillBarnum 2 жыл бұрын
Glad it helped!
@luxfortis4377
@luxfortis4377 5 жыл бұрын
thanks
@Aryaveer_jadli
@Aryaveer_jadli 2 жыл бұрын
Thank you sensei. I love u for this💋
@harshadaborade5712
@harshadaborade5712 3 жыл бұрын
Great🙏
@BillBarnum
@BillBarnum 3 жыл бұрын
Thanks for the feedback!
@kashvibhatia9910
@kashvibhatia9910 3 жыл бұрын
Thank you so much
@BillBarnum
@BillBarnum 3 жыл бұрын
I'm glad you liked the video, Kashvi!
@RandomNoob1124
@RandomNoob1124 3 жыл бұрын
This visual is the best part🔥🔥🔥
@BillBarnum
@BillBarnum 3 жыл бұрын
Thanks for the feedback!
@madchallenges847
@madchallenges847 6 ай бұрын
how to print at the end?
@BillBarnum
@BillBarnum 6 ай бұрын
Before you declare the class: import java.util.Arrays; When you are ready to print it: System.out.println(Arrays.toString(x)); //assuming the array is named x
@nadunrathnayaka160
@nadunrathnayaka160 4 жыл бұрын
why we divide length by 2
@BillBarnum
@BillBarnum 4 жыл бұрын
We only go through the first half of the array. As we are going through the first half, we swap values with the corresponding index in the second half.
@nadunrathnayaka160
@nadunrathnayaka160 4 жыл бұрын
@@BillBarnum thank you sir
@why1t
@why1t 3 жыл бұрын
If we aren't supposed to use this method on the AP exam, what method do we use then?
@BillBarnum
@BillBarnum 3 жыл бұрын
The algorithm I demonstrated would be fine. I mentioned another algorithm to reverse values using a temp array. However, I did not demonstrate that method.
@why1t
@why1t 3 жыл бұрын
@@BillBarnum ah, ok. Thanks! :)
@arhzzzmusic556
@arhzzzmusic556 4 жыл бұрын
What do i type to write the array out Out.print what???
@BillBarnum
@BillBarnum 4 жыл бұрын
I don't quite understand your question.
@arhzzzmusic556
@arhzzzmusic556 4 жыл бұрын
@@BillBarnum Dont worry I've figured it out.
@BillBarnum
@BillBarnum 4 жыл бұрын
@@arhzzzmusic556 Great!
@Aryaveer_jadli
@Aryaveer_jadli 2 жыл бұрын
@@arhzzzmusic556 how did u do that bro?
@nickhlope1717
@nickhlope1717 2 жыл бұрын
How did you print out the array elements to display
@nickhlope1717
@nickhlope1717 2 жыл бұрын
Great video. Just wanna ask why we had to say x.length - i - 1....what exactly does that mean
@BillBarnum
@BillBarnum 2 жыл бұрын
We want to swap each index with its corresponding value on the other end of the array. If i is 0, then x.length - i -1 will be the last index. If i is 1, then x.length - i - 1 will be the second to last index.
@brankoblesicjr.5792
@brankoblesicjr.5792 4 жыл бұрын
Writing Classes and Objects (Java Tutorial)
6:10
Bill Barnum
Рет қаралды 7 М.
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 510 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 15 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,3 МЛН
Arrays In Java Tutorial #10
9:26
Alex Lee
Рет қаралды 446 М.
Primitive and Reference (Object) Types in Memory (Java Tutorial)
5:12
Java Program to Reverse an Array
7:39
Programming Tutorials
Рет қаралды 88 М.
Vectors in Java: The 1 Situation You Might Want To Use Them
16:13
Coding with John
Рет қаралды 78 М.
Learn Java in 14 Minutes (seriously)
14:00
Alex Lee
Рет қаралды 4,6 МЛН
How to Reverse an Array in Java - Animation
8:47
Dinesh Varyani
Рет қаралды 36 М.
Reverse String in Java Practice Program #41
11:53
Alex Lee
Рет қаралды 258 М.
Prefer Arrays Over Lists. Seriously...
8:31
Amigoscode
Рет қаралды 40 М.
Methods (Java Tutorial)
7:56
Bill Barnum
Рет қаралды 8 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 265 М.
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 15 МЛН