5,790 views
8 8 votes

Find the output of the following Java code line 

System.out.printIn(math.floor(-7.4))
  1. -7
  2. -8
  3. -7.4
  4. -7.0

2 Answers

2 2 votes
 floor method​  of Java Math class. floor method returns the largest interger .so answer is (b)
Answer:
Position:
Show:

Related questions

5 5 votes
3 answers 3 answers
5.6k
5.6k views
go_editor asked Jun 22, 2016
5,595 views
In Java, after executing the following code what are the values of x, y and z?int x,y=10; z=12;x=y++ + z++;x=22, y=10, z=12x=24, y=10, z=12x=24, y=11, z=13x=22, y=11, z=1...
0 0 votes
2 2 answers
1.2k
1.2k views
admin asked Sep 28, 2024
1,175 views
A standard Java API for monitoring and managing applications isJVMJVNJMXJMY 
3 3 votes
3 answers 3 answers
8.0k
8.0k views
shivanisrivarshini asked Jun 27, 2016
7,983 views
Consider the following Java code fragment:public class While { public void loop() { int x = 0; while(1) { System.out.println("x plus one is" +(x+1)); } } }There is syntax...
3 3 votes
1 answers 1 answer
7.3k
7.3k views
Misbah Ghaya asked Jun 5, 2016
7,311 views
The built-in base class in java, which is used to handle all exceptions isRaiseExceptionErrorThrowable