Can You Access?

  • + 1 comment

    what is wrong with my solutions?

    import java.io.*;
    import java.util.*;
    
    public class Solution {
        public static void main(String[] args) {
            Scanner sc=new Scanner(System.in);
            int num=sc.nextInt();
            int a=0;
            if((num>0)&&(num&(num-1))==0){
                System.out.printf("%d is power of %d",num,2);
            }
            else{System.out.printf("%d is not power of %d\n",num,2);
            System.out.print("An instance of class: Solution.Inner.Private has been created");
            }
    
            }
    }