Skip to main content

What is and how to use the operator: %

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
2 replies [Last post]
xXTrollBrosXx
Offline
Joined: 2013-11-02

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
arnavkumartechno
Offline
Joined: 2013-10-25

% operator is remainder operator
For example:
int a=6;
int b=13;
System.out.println("division result is "+b/a);
System.out.println("remainder result is "+b%a);
Hope you understood it.

xXTrollBrosXx
Offline
Joined: 2013-11-02

THANK YOU BRO!!!