+ 1

🛑Math.abs(Math.min(-6, 3)); answer-❓❓❓❓❓❓❓❓❓

21st Aug 2021, 10:00 AM
Suchismita
Suchismita - avatar
19 ответов
+ 23
✨Suchismita ✨ min and max are methods in Math class which returns min and max value so here Math.min(-6, 3) will return -6 Now Math.abs will return absolute value so result will be 6
21st Aug 2021, 10:22 AM
A͢J
A͢J - avatar
+ 6
really??? you can't declare variable and then print it out? If I were your teacher you would get disqualification.
21st Aug 2021, 10:14 AM
Shadoff
Shadoff - avatar
+ 5
Please tag the relevant programming language. You can test the code snippet on sololearn playground and check out what happens.
21st Aug 2021, 10:22 AM
Lisa
Lisa - avatar
+ 5
"why to open the question and waste your time, only to find bs" ✨Suchismita ✨ aren't you the one who posted and open this worst question? he was only answering this one.
21st Aug 2021, 11:37 AM
Rellot's screwdriver
Rellot's screwdriver - avatar
+ 3
Instead of scolding ✨Suchismita ✨ , i think u shoùld all explain it like A͢J - S͟o͟l͟o͟H͟e͟l͟p͟e͟r͟ , considering level, it might be hard. May be she is a start-up.
23rd Aug 2021, 4:28 AM
ShadowCipher
ShadowCipher - avatar
+ 3
Hosein Are you here to send message only because I don't see yours any activity. Btw you should wait for 14 more days.
23rd Aug 2021, 4:41 AM
A͢J
A͢J - avatar
+ 2
Math.min(-6, 3) return -6 Math.abs(-6) return 6 Finally Math.abs(Math.min(-6,3) return 6
23rd Aug 2021, 4:57 AM
Abirami
Abirami - avatar
+ 1
😐😐😐 Math.min(-6,3)=-6 Math.abs(-6)=6 😐😐😐
21st Aug 2021, 5:55 PM
Javad HD
Javad HD - avatar
+ 1
Math.min (-6,3) will result in -6. The smallest number between -6 and 3 is " -6". Moving on to the next part, which is Math.Abs(-6). How did we get that -6?? We got that from Math.min(-6,3) above. Math.abs(-6). How do we do With this abs things?? It will return to positive within the parentheses. So, Math.abs(-6) will result in "6". Hope this solution helps you ^o^
22nd Aug 2021, 2:27 AM
Jevon Harry
Jevon Harry - avatar
+ 1
First . Min(-6,3) = -6 Second .math.abs(-6)= 6 is last answer
22nd Aug 2021, 3:33 PM
khààlid Mohamud
khààlid Mohamud - avatar
+ 1
Math.min returns the smallest number which is -6 and math.abs returns the absolute value which is 6.
22nd Aug 2021, 5:18 PM
Ahmed Afgooye 🇸🇴 🇸🇴
Ahmed Afgooye 🇸🇴 🇸🇴 - avatar
+ 1
min and max are methods in Math class, min --> returns minimum value max --> returns maximum value abs --> returns absolute value Now, Math.abs(Math.min(-6,3)) = Math.abs(-6) # minimum of (-6,3) is -6. = 6 # absolute value of -6 is 6. Hence, answer is 6.
23rd Aug 2021, 5:45 AM
Gokul Ananth
Gokul Ananth - avatar
+ 1
✨Suchismita ✨ answer: 6 Explanation:: First open the smallest bracket:: i.e.:Math.min(-6,3) Math.min returns the minimum value that is -6 so value will be -6 then as the smallest bracket is opened now open the other bracket i.e.,Math.abs(): Math.abs returns the absolute value that is -6 will converted to 6...now nothing is more there to solve so final answer is 6.. Hope this anwer is helpful for you... Happy coding!!☺️
23rd Aug 2021, 6:20 AM
🔰Saurabh🔰
🔰Saurabh🔰 - avatar
0
The Math.min() function actually returns the least/smallest/minimum number among the numbers passed to it as parameters. Here, it returns -6, as we can see it is the minimum among the passed numbers (i.e. -6 and 3). Math.abs() function gives the absolute value of the number passed as an argument. This means, if the passed argument is positive, it will return the same argument back, but if the argument passes is negative, it returns the positive of it. So according to your given sample, it returns 6.
21st Aug 2021, 6:05 PM
APURVA JAISWAL
APURVA JAISWAL - avatar
0
Math.abs() will actually return absolute value of an integer... For example, Math.abs(-5) will return 5. Math.abs(5) will return 5. ________ And Math.min(a,b); will return the minimum int value.. So , Math.min(-6,3) returns -6 and Math.abs(-6) returns 6.. _--_
23rd Aug 2021, 3:41 AM
Oseamiya
Oseamiya - avatar
0
Math.min(-6, 3) //is -6 Math.abs(-6) //is 6 So the answer is 6
23rd Aug 2021, 6:42 AM
Владимир Панкратьев
Владимир Панкратьев - avatar
0
public class Program { public static void main(String[] args) { int a = Math.abs(Math.min(-6, 3)); System.out.println(a); } } https://code.sololearn.com/java
18th Mar 2022, 10:29 PM
Nathan Morales
0
6
3rd Oct 2022, 3:11 AM
Sujit suresh shinde