Introduction to Arrays and array operations
Title
Question
<font size="2">Madam/sir,</font>
<font size="2">In introduction to arrays class you directly used System.out.println(a); to print an array say a[ ]. But in 2nd lecture of Arrays i.e Operations on array you used a variable of data type String and then stored the converted form of array to string to that String variable say mStr as you have shown. Why you did so? Can't the loop method as you have shown in lecture 1 of "Introduction to Arrays" be implemented.</font>
<font size="2">Also how can we do two dimensional operations of arrays say a matrix operation. Is it same as a nested loop operation as used in C++ and C languages for 2D arrays.</font>
<font size="2">Also can I give the exam of Java and get certified by IIT Bombay. I don't know how to register for that because in Swayam NPTEL portal it's shown that the course is of 2020. Please clear this also and what will be the exam fees?</font>
Java Array-Operations 04-05 min 20-30 sec
Answers:
Hi,
Do write on my email id dianaly3129@gmail.com with following details, we will help you on how to register.
1. Full name-
2. College name-
3. Email id- 4. Phone number-
Thanks and Regards,
Diana Low
The tutorial on "Introduction to Arrays" is about creating arrays and accessing array elements. While accessing array elements we need to mention index of array element. Thus, print statements include array index. i.e. System.out.pritnln(marks[3]).
"Arrays" class under "java.util" package is used for operations on array and "toString" method returns a string representation of the contents of this array. The string representation consists of a list of the array’s elements, enclosed in square brackets (“[]”).
You can also use loop method to access all the elements of the array.
Nesting of loops is similar to C and C++.
Login to add comment