Hello i am a beginner please tell me
whats wrong with my code (red colored)
it gives me an error for 0308 that "The literal 0308 of type int is out of range"
this error is only with 0308 and 0307
any other digit instead of 0308 and 0307 is working
package Loops; import java.util.Scanner; public class Mobile_Network { public static void main(String[] args) { // TODO Auto-generated method stub Scanner num = new Scanner(System.in); System.out.println("Enter Network Code"); int ncode = num.nextInt(); if (ncode > 0300 && ncode < [COLOR="#FF0000"]0308[/COLOR]){ System.out.println("Your Neywrok Sim is Jazz"); } else if (ncode > 0321 && ncode < 0324){ System.out.println("Your Neywrok Sim is Warid"); } else if (ncode > 0331 && ncode < 0337){ System.out.println("Your Neywrok Sim is Ufone"); } else if (ncode > 0341 && ncode < 0347){ System.out.println("Your Neywrok Sim is Zong"); } } }
--- Update ---
and how to use "or" condition here
let say for explanation
if (ncode == 0301 or 0302 or 0303) kind of that
thanks in advance