class Main { public static void main(String args[]) { int x=10; System.out.println("The PreDecrement value is "+(--x)); } }
The PreDecrement value is 9
class Main { public static void main(String args[]) { int x; x=Integer.parseInt(args[0]); System.out.println("The PreDecrement value is "+(--x)); } }
The PreDecrement value is 9
import java.util.*; class Main { public static void main(String args[]) { int x; Scanner s=new Scanner(System.in); System.out.println("Enter x value "); x=s.nextInt(); System.out.println("The PreDecrement value is "+(--x)); } }
Enter x value 10
The PreDecrement value is 9