Types and keyboard input
Types and keyboard input
- 2
Unavailable
Comments (15)
- Popular
- New
- Old
You must be signed in to leave a comment
Farcalito
26 December 2022, 04:58
they didnt even teach some of these questions in previous lessons
+5
Anonymous #11208858
8 December 2022, 04:23
I thought it was scanner.BufferedReader ?
+1
ghost
27 October 2022, 19:18
In Java, you can get the length of the string "hello" with this statement: ??
0
Manh-Nam Nguyen
30 May, 07:42
"hello".length()
0
Jelly bean
27 September 2022, 18:32
i doubt this 5/2 gives 2.5 or does it, is it 2 or something
+3
Bassy Boosty Extremy
8 February, 08:06
5/2 gives 2, java and C+ things
0
Maksim Krasnov
12 June 2022, 20:24
5/2 = 2 // 2 fits twice in 5
5%2 = 1 // remainder - whole number after division
5 = 2*2 + 1
--------------
2/5 = 0 // 5 fits zero times in 2
2%5 = 2 // remainder - whole number after division
2 = 0 +2
+6
Tönnes
5 June 2022, 05:53
5%2 question is either bugged or I'm seriously misunderstanding what a modulo does when I get the answer 5 :D If 2 were the right answer it should be 2%5, no? :D
0
Anonymous #10882853
27 December 2021, 19:43
very nice java in the dance floor
0
Lauren Millyard
12 October 2021, 11:10
% here, stands for modulo, which returns the remainder of the division of two numbers
so for example
the result of 6 modulo 2 would be 0 (there is nothing left over from 6/2)
7%2 = 1 (you can divide 7 by 2 three times and there would be 1 left over)
+5
Tönnes
5 June 2022, 05:50
My question was "what is the evaluation of 5%2" and the answers were 1, 2, 2.5, 3 :D I mean, 5 but what the heck :D
0
sumit singh
6 August 2022, 07:28
the answer would be 1 because that will be the remainder when we divide 5 by 2.
and modulo operator gives us the same.
+1
jason reid
3 October 2021, 14:51
i didnt read anything about 5%2
+1
ConnerMcFly
13 October 2021, 08:55
Yes it wasnt mentioned in a text before this quiz. But I am sure it will be coming soon.
0
Tönnes
5 June 2022, 05:53
It was mentioned in a previous lesson but either the question or the answers are wrong :D
0