SyntaxFix
Write A Post
Hire A Developer
Questions
1 and 3 are integer contants and so Java does an integer division which's result is 0. If you want to write double constants you have to write 1.0 and 3.0.
1.0
3.0