Courses
Courses
Code Compiler
Code Compiler
Discuss
Pricing
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
Can someone suggest codespace to run my code (react.js)?
1 Votes
Solved Chess tournament you’re creating code for a chess tournament
0 Votes
Is it legal to use conditional preprocessors inside a macro function?
1 Votes
I write a python code for "Take a phrase and replace any instances of an integer from 0-10 and replace it with the English word.
1 Votes
C Programming roadmap
2 Votes
[off-topic]Where is Result??
1 Votes
[SOLVED] Where do you find code coaches?
1 Votes
Messages
1 Votes
Cpp
1 Votes
Adding two numbers
1 Votes