Hi Everyone, I am a beginner with java, please pardon my stupidity

The program below is not working and I have this error. Please let me know what I am doing wrong.

public class test {
    public static void main(String[] args) throws Exception {
         String Month = "May";
         if ( Month == "May")  {
                 String sign = "Gemini";
                 int DDay = 26;
               }
         if ( DDay == 26) {
                 String color = "Yellow";
                }
         System.out.printf("Jack Star Sign is:");
         System.out.printf(sign);
         System.out.printf(color);
                 }

        }

test.java:30: cannot find symbol
symbol  : variable sign
location: class test
         System.out.printf(sign);
                           ^
test.java:31: cannot find symbol
symbol  : variable color
location: class test
         System.out.printf(color);
                           ^
2 errors
-----------------------------------------------------------------------------

Edited 3 Years Ago by mike_2000_17: Fixed formatting

jumped the gun. For the benefit of the people who are like me

public class test1 { 
    public static void main(String[] args) throws Exception { 
         String Month = "May"; 
         String sign=""; 
         String color=""; 
         int DDay = 26; 
         if ( Month == "May")  { 
                 sign = "Gemini"; 
                 //int DDay = 26; 
         } 
         if ( DDay == 26) { 
                 color = "Yellow"; 
         } 
         System.out.printf("Jack Star Sign is:"); 
         System.out.printf(sign); 
         System.out.printf(color); 
         } 
}

Edited 3 Years Ago by mike_2000_17: Fixed formatting

This question has already been answered. Start a new discussion instead.