#29 Multi Dimensional Array in Java
Telusko
@teluskoAbout
Hey Aliens Welcome to Telusko! We create technical tutorials that take you from beginner to advanced level. You’ll find content on: Core Programming: Java (Beginner to Advanced), Python, JavaScript Frameworks & Tools: Spring Framework, Hibernate, Blockchain, Spring AI, AI Engineering Computer Science Essentials: Data Structures, Networking, System Design, and more Trending Tech: Cloud, Microservices, and beyond Alongside technical tutorials, we also share motivational videos and host sessions with leading industry experts. We don’t just stop at free tutorials—we also provide paid courses (live and recorded) and corporate training to help professionals and organizations upskill. So, whether you’re just starting out or sharpening your professional skills, there’s always something here for you. 📩 Business Inquiries: [email protected] 🎓 Explore Live & Recorded Courses: https://telusko.com/
Latest Posts
Video Description
Check out our courses: Java Spring Boot AI Live Course: https://go.telusko.com/JavaSpringBootAI Coupon: TELUSKO20 (20% Discount) AI Powered DevOps with AWS - Live Course :- https://go.telusko.com/AIDevOps-AWS Coupon: TELUSKO20 (20% Discount) Master Java Spring Development : https://go.telusko.com/masterjava Coupon: TELUSKO20 (20% Discount) For More Queries WhatsApp or Call on : +919008963671 website : https://courses.telusko.com/ Udemy Courses: Spring: https://go.telusko.com/udemyteluskospring Java:- https://go.telusko.com/udemyteluskojava Java Spring:- https://go.telusko.com/Udemyjavaspring Java For Programmers:- https://go.telusko.com/javaProgrammers Python : https://go.telusko.com/udemyteluskopython Git : https://go.telusko.com/udemyteluskogit Docker : https://go.telusko.com/udemyteluskodocker Instagram : https://www.instagram.com/navinreddyofficial/ Linkedin : https://in.linkedin.com/in/navinreddy20 TELUSKO Android App : https://go.telusko.com/TELUSKOAPP TELUSKO IOS App : https://apple.co/3SsgmU2 Discord : https://discord.gg/D8hWe9BqfF In this lecture we are discussing: 1)what is multidimensional array? 2)Why do we need multidimension array? 3)How to create multidimension array? 4)How to access element of multidimension array? 5)how to use enhanced for loop and simple loop in multidimension array to traverse array element? #1 what is multidimension array? -- simple we can say it is array of array ------------- | 1 | 2 | 3 | ------------- | 4 | 5 | 6 | ------------- Above is example of 2-d array which has 2 rows and 3 columns. -- it seems to look like a bigger array consist two single dimension array. -- just like we have 3-d array and array might be n-dimension. #2 Why do we need multidimension array? -- to solve some matrix problem to solve grid problem #3 How to create multidimension in java? -- different Ways to create array in java a)Literal notation Literal notation: int [][]arr = {{1, 2, 3},{4,5,6}}; b)Object notation int [][]nums=new int[2][3]; -- general syntax for object notation: -- dataType [][]arrayName=new dataType[rows][columns]; #4 how to access element of multidimension array element? let we create 2d array arr int [][]arr = {{1, 2, 3},{4,5,6}}; ------------- | 1 | 2 | 3 | ------------- | 4 | 5 | 6 | ------------- -- there are two rows whose index are 0,1 and columns are 0,1,2. -- want to access 2 which are at row 0 and columns 1 -- System.out.println(arr[0][1]); //give 2 simple if you want to access element at ith row and jth column then; arr[i][j]; //it is value at that position #5 How to use enhanced for loop for array name arr: -- using for loop traverse all element -- arr.length give number of rows and arr[0].length give number of column in first row for(int i=0;i arr.length;i++){ for(int j=0;j arr[0].length;j++){ System.out.print(arr[i][j]+" "); } System.out.println(); } using enhanced for loop: for(int x[]: arr){ for(int y:x){ System.out.print(y+" "); } System.out.println(); } general syntax for enhanced for-loop for(dataType singleDimension[]: twoDimension){ for(dataType element: singleDimension){ System.out.println(element); } } Github repo : https://github.com/navinreddy20/Javacode.git More Learning : Java :- https://bit.ly/3x6rr0N Python :- https://bit.ly/3GRc7JX Django :- https://bit.ly/3MmoJK6 JavaScript :- https://bit.ly/3tiAlHo Node JS :- https://bit.ly/3GT4liq Rest Api :-https://bit.ly/3MjhZwt Servlet :- https://bit.ly/3Q7eA7k Spring Framework :- https://bit.ly/3xi7buh Design Patterns in Java :- https://bit.ly/3MocXiq Docker :- https://bit.ly/3xjWzLA Blockchain Tutorial :- https://bit.ly/3NSbOkc Corda Tutorial:- https://bit.ly/3thbUKa Hyperledger Fabric :- https://bit.ly/38RZCRB NoSQL Tutorial :- https://bit.ly/3aJpRuc Mysql Tutorial :- https://bit.ly/3thpr4L Data Structures using Java :- https://bit.ly/3MuJa7S Git Tutorial :- https://bit.ly/3NXyCPu Donation: PayPal Id : navinreddy20 https://www.telusko.com
You May Also Like
Master Java Arrays Today
AI-recommended products based on this video

Pishengfa DIY Stitch Book, Embroidery Stitch Book, DIY Sewing Books, EmbroideryS Books of Stitches, with 86/128 Sewing Tips for Beginners, Unique Embroidery Handmade Gifts (Grey)

LEGO Speed Champions Oracle Red Bull Racing RB20 F1 Race Car Model Kits - Building Set for Adults, Ages 18+ with Realistic Features - Red Bull F1 DIY Crafts for Display - Gift Idea for F1 Fans - 77243




















