Which of the following would compile without error? - ProProfs Discuss
Advertisement

Which of the following would compile without error?

Int a = Math.abs(-5); Int b = Math.abs(5.0); Int c = Math.abs(5.5F); Int d = Math.abs(5L);

Asked by JQuizMaster, Last updated: Apr 21, 2024

+ Answer
Request
Question menu
Vote up Vote down

2 Answers

John Adney

John Adney

John Adney
John Adney

Answered Jul 13, 2017

How come it is int a=Math.Abs(-5);

if int a=Math.abs(-5);

int a=Math.abs(5.0);

int c=Math.abs(5.5F);

int d=Math.abs(5L);

upvote downvote
Reply 

John Smith

John Smith

John Smith
John Smith

Answered Jul 13, 2017

Int a = Math.abs(-5);
upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.