Types and keyboard input

  • 2
  • Unavailable
Types and keyboard input

2
Survey/quiz
Types and keyboard input,  level 2,  lesson 9
Unavailable
Types and keyboard input
Types and keyboard input
Comments (11)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
ghost
Level 5 , Jakarta, India
27 October, 19:18
In Java, you can get the length of the string "hello" with this statement: ??
Jelly bean
Level 3 , Jakarta, India
27 September, 18:32
i doubt this 5/2 gives 2.5 or does it, is it 2 or something
Maksim Krasnov
Level 34 , Kyiv, Ukraine
12 June, 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
Tönnes
Level 3 , United States
5 June, 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
Anonymous #10882853
Level 8 , France, France
27 December 2021, 19:43
very nice java in the dance floor
Lauren Millyard
Level 3 , Motueka , New Zealand
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)
Tönnes
Level 3 , United States
5 June, 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
sumit singh
Level 5 , India
6 August, 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.
jason reid
Level 3 , United States
3 October 2021, 14:51
i didnt read anything about 5%2
ConnerMcFly
Level 7 , Germany, Germany
13 October 2021, 08:55
Yes it wasnt mentioned in a text before this quiz. But I am sure it will be coming soon.
Tönnes
Level 3 , United States
5 June, 05:53
It was mentioned in a previous lesson but either the question or the answers are wrong :D