Types and keyboard input
Types and keyboard input
- 3
Unavailable
Comments (19)
- Popular
- New
- Old
You must be signed in to leave a comment
delta
1 August, 07:36
the question 5/2 didn't specify what type of variable they are. if both are double 2.5 is an answer . if both are int 2 is the answer.
+1
Timurlan
26 July, 14:46
I didn't get that int can store 2.... if include negative digits there are 4....
+1
rags 3
11 June, 18:56
they actually taught it all but not direct its critical thinking like int don't do fractions its all there just not in plain text in my opinion
0
Farcalito
26 December 2022, 04:58
they didnt even teach some of these questions in previous lessons
+8
Anonymous #11208858
8 December 2022, 04:23
I thought it was scanner.BufferedReader ?
+3
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
+7
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
Niranjan Balaguru
22 June, 22:10
No, it would be like remainder that we get by dividing 2 by 5 which is actually 4 and not 2!
0
Anonymous #10882853
27 December 2021, 19:43
very nice java in the dance floor
0