import java.util.Scanner;
public class ZodiacSign{
public static void main(String args[]){
Scanner input = new Scanner(System.in);
int Feb,March,ZodiacSign,Pisces,Aquarius,Aries,Taurus;
int selection;
System.out.println("Feb");
System.out.println("Feb 1,2,3,4\n Feb 5,6,7,8\n Feb 9,10,11,12\n Feb 13,14,15,16\n Feb 17,18,19,20\n Feb 21,22, 23, 24\n Feb25,26,27,28\n March 1,2,3,4\n March 5,6,7,8\n March 9,10,11,12\n March 13,14,15,16\n March17,18,19,20\n March 21,22,23,24\n March 25,26,27,28\n March 29,30,31");
System.out.println("Please enter your date of birth");
System.out.println("Please enter your month of birth");
selection = input.nextInt();
if(Feb>= 19){
ZodiacSign = Pisces ;
System.out.println("Your zodiac sign is Pisces");
}
else
{
System.out.println("Your zodiac sign is Aquarius");
}
if(March>=22){
ZodiacSign = Aries;
System.out.println("Your zodiac sign is Aries");
}
else
{
System.out.println("Your zodiac sign is Taurus");
}
System.out.println("End of Program");
}
}
Это дает мне четыре ошибки:
ZodiacSign.java:19:error: variable Feb might not have been initialized
if(Feb>= 19){
^
ZodiacSign.java:20:error: variable Pisces might not have been initialized
ZodiacSign= Pisces ;
^
ZodiacSign.java:27:error: variable March might not have been initialized
if(March>= 22){
^
ZodiacSign.java:28:error: variable Aries might not have been initialized
ZodiacSign= Aries ;
^