0

Method returning array

How to write a method, that returns array? Is this good?: public [ ] (x; y){ ... return arr }

25th May 2018, 11:27 AM
Balázs Rippl
Balázs Rippl - avatar
13 Respuestas
0
You need to define return type like this: public int[] () Also, seperate method parameters with , not ;
25th May 2018, 11:36 AM
BlazingMagpie
BlazingMagpie - avatar
0
Ohh, nice. Thank you
25th May 2018, 11:39 AM
Balázs Rippl
Balázs Rippl - avatar
0
If it doesn't work, post here again.
25th May 2018, 11:42 AM
BlazingMagpie
BlazingMagpie - avatar
0
It's okay... Now i have the only problem, when i run the code in sololearn and it says error on System.out.println... It says, that symbol not found, symbol is in .out, but it is located in .System
25th May 2018, 11:45 AM
Balázs Rippl
Balázs Rippl - avatar
0
It's okay... Now i have the only problem, when i run the code in sololearn and it says error on System.out.println... It says, that symbol not found, symbol is in .out, but it is located in .System
25th May 2018, 11:45 AM
Balázs Rippl
Balázs Rippl - avatar
0
Can you link the code here?
25th May 2018, 11:46 AM
BlazingMagpie
BlazingMagpie - avatar
25th May 2018, 11:47 AM
Balázs Rippl
Balázs Rippl - avatar
0
It is far not complete, i just wanted to test it till here
25th May 2018, 11:47 AM
Balázs Rippl
Balázs Rippl - avatar
0
You forgot () after println
25th May 2018, 11:48 AM
BlazingMagpie
BlazingMagpie - avatar
0
Let me kill myself :'D I just started programming and it already freaks me out
25th May 2018, 11:48 AM
Balázs Rippl
Balázs Rippl - avatar
0
Altough, is the double input correct this way?
25th May 2018, 11:50 AM
Balázs Rippl
Balázs Rippl - avatar
0
Yes
25th May 2018, 11:59 AM
BlazingMagpie
BlazingMagpie - avatar
0
Thank you
25th May 2018, 12:03 PM
Balázs Rippl
Balázs Rippl - avatar