Add 1 to a given number | Java code to Add 1 to a given number ; Driver program
class GFG { static int addOne ( int x ) { return ( - ( ~ x ) ) ; } public static void main ( String [ ] args ) { System . out . printf ( " % d " , addOne ( 13 ) ) ; } }