Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,843 members, 7,813,842 topics. Date: Tuesday, 30 April 2024 at 07:41 PM

Java Codes For Beginners And Pros (relaxation Thread) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java Codes For Beginners And Pros (relaxation Thread) (1228 Views)

Download 18 Python Programming Books For Beginners And Veterans / Guess The Number - Java Codes / Python �� Beginners And Experts (2) (3) (4)

(1) (Reply) (Go Down)

Java Codes For Beginners And Pros (relaxation Thread) by SilverG33k(m): 11:34am On Jun 02, 2017
To the java pros....

I'm not much of a java code writer but I know the basics so don't attack me

Yours Sincerely
Silver

.................

I just wrote the below code and I don't even know what's going to be the output.... Turn yourself to a compiler and tell us the output of the code

public int rand()
{
Integer random = {"1", "2", "3", "4", "5"};
Integer randomGetter = (int) Math.random() * 5;
Integer finalRandom = random[randomGetter];
Integer answer = finalRandom;
return answer;
}

//if my code has a logical error, I did it deliberately, it is my error, not yours (^_^)

my question iz..... What will be the output of the code above??
Re: Java Codes For Beginners And Pros (relaxation Thread) by Nobody: 12:02pm On Jun 02, 2017
I am a newbie in Java. ur code was not written
properly but the output are
5
10
15
20
25
Re: Java Codes For Beginners And Pros (relaxation Thread) by SilverG33k(m): 4:40pm On Jun 02, 2017
proxy20:
I am a newbie in Java. ur code was not written
properly but the output are
5
10
15
20
25
Oya write it properly
Re: Java Codes For Beginners And Pros (relaxation Thread) by rayyspark(m): 6:09pm On Jun 02, 2017
SilverG33k:
Oya write it properly
try 2 be polite
Re: Java Codes For Beginners And Pros (relaxation Thread) by SilverG33k(m): 8:34pm On Jun 02, 2017
rayyspark:

try 2 be polite
My apologies
Re: Java Codes For Beginners And Pros (relaxation Thread) by SilverG33k(m): 8:34pm On Jun 02, 2017
rayyspark:

try 2 be polite
My apologies
Re: Java Codes For Beginners And Pros (relaxation Thread) by ABCthingx: 5:34pm On Dec 17, 2019
Naso this thread take die cheesy shocked

(1) (Reply)

PHP Script Wanted / What Kind Of App Will You Wish Was Available? / Create Undetectable Backdoor To Hack Into Any Android Phone/laptop Computers

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 8
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.