Question: public class PracticeQuiz 0 2 { public static void main ( String [ ] args ) { / / What is output of this print,

public class PracticeQuiz02{
public static void main(String[] args){
// What is output of this print, statement?
int nNum1=15;
int nNum2=7;
double dResult =(nNum1/ nNum2);
System.out.println("The result is: "+ dResult);
}
}
The result is: 2.0
The result is: 2
The result is: NaN
Compile Error
Runtime Error
The result is: 2.142857142857143
public class PracticeQuiz 0 2 { public static

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!