Courses
Courses
Code Compiler
Code Compiler
Discuss
Teams
Log in
Register
Menu
Q&A Discussions
Search
Search
Ask a question
Ask a question
Array in Java and Sum
arrays
myarr
sum
масивы
4 Votes
9 Answers
29th Jan 2018, 9:45 PM
Grey King
public class Program { public static void main(String[] args) { int [ ] myArr = {6, 42, 3, 7}; int sum=0;
arrays
1 Vote
8 Answers
16th Mar 2018, 3:48 PM
Devansh Gupta
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; // 4
arrays
java
2 Votes
9 Answers
5th Jul 2017, 12:49 PM
Sheevika
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; can't get this declaration?
arrays
0 Votes
2 Answers
25th Sep 2018, 2:58 PM
yoga
int [] myArr = {3, 8,5,3}; what is the code to multiple the value array from index 0 to 3 ???
array
java
loop
2 Votes
2 Answers
1st Jan 2017, 7:41 PM
shakil
int [ ] myArr = {6, 42, 3, 7}; int sum=0; for(int x=0; x<myArr.length; x++) { sum += myArr[x]; } System.out.println(sum)
arrays
java
0 Votes
3 Answers
20th Mar 2017, 4:39 AM
naveen roshan
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; sop(x);
arrays
java
0 Votes
3 Answers
16th Dec 2016, 4:31 AM
Tanaji Kolekar
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; why are there only 2 [ ] in the array declaration?
arrays
1 Vote
5 Answers
21st Jan 2018, 11:40 AM
russ
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; // 4
arrays
0 Votes
1 Answer
9th Jan 2019, 3:18 PM
Nikhil Verma
int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; // 4
arrays
java
1 Vote
1 Answer
29th Jun 2017, 9:48 AM
Narayan K
public class Program { public static void main(String[] args) { int [ ] myArr = {6, 42, 3, 7}; int sum=0; for(int x=0; x<myArr.length; x++) { sum += myArr[x]; } System.out.println(sum); } }
arrays
java
1 Vote
7 Answers
14th Oct 2016, 6:14 AM
Gopal Varma Gottimukhala
public class Program { public static void main(String[] args) { int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][0]; System.out.println(x); } }
arrays
java
0 Votes
7 Answers
14th Oct 2016, 11:03 AM
Gopal Varma Gottimukhala
public class Program { public static void main(String[] args) { int [ ] myArr = {6, 42, 3, 7}; int sum=0; for(int x=0; x<myArr.length; x++) { sum += myArr[x]; } System.out.println(sum); } } very lovely program. please who can explain the meaning of "+=" in the code?
arrays
java
0 Votes
5 Answers
20th Oct 2016, 3:24 PM
Raymond Crump Rukevwe
public class Program { public static void main(String[] args) { int[ ][ ] myArr = { {1, 2, 3}, {4}, {5, 6, 7} }; myArr[0][2] = 42; int x = myArr[1][1]; System.out.println(x); } } why it does not give any garbage value as output?
arrays
java
-1 Vote
4 Answers
9th Nov 2016, 6:21 PM
Sandesh
Ask a question
Ask a question
Ask a question
Ask a question
Hot today
What's wrong with this code ? ( Beginner)
4 Votes
Pig Latin
0 Votes
Someone can help me
0 Votes
Square Roots
0 Votes
What's wrong with this?
2 Votes
Currently learning C++, I’m getting into socket programming with C++
0 Votes
I’m new someone can help me
0 Votes
What's doctype htMl
2 Votes
HTML community, HELP!!
0 Votes
need help with the HTML code
1 Votes