Answer:
See explaination
Explanation:
public class YearToAnimal {
static void yearToAnimalZodiac(int year){
String[] animals = {"Rat", "Ox", "Tiger", "Rabbit", "Dragon", "Snake", "Horse", "Goat", "Monkey", "Rooster", "Dog", "Pig"};
int baseYear = 2020;
int index = (year - baseYear) % 12;
// in case of negative index, change it to positive
if(index < 0)
index = 12 + index;
System.out.println(year + ": " + animals[index]);
}
// some test cases
public static void main(String[] args) {
yearToAnimalZodiac(2020);
yearToAnimalZodiac(2021);
yearToAnimalZodiac(2019);
yearToAnimalZodiac(2009);
yearToAnimalZodiac(2008);
yearToAnimalZodiac(2007);
}
}
Wireless connectivity is recommended for use with laptops or mobile devices, especially as newer devices are less likely to have ethernet connectivity built in. In either case, use of wireless technology make it easier for users to move around without having to worry about being plugged in. Wired connections are still recommended for anything that doesn't need to be able to move as it is generally more reliable, and depending on the devices involved, could offer a faster connection.
What language is this??? Could you ask in English?