Japanese universities offer a great number of courses in English. Hence Japanese language skills are not necessarily required for your studies in Japanese universities. Learning Japanese, however, will make your life in Japan much easier and more fruitful once you arrive in the country.
If you are interested in learning Japanese - whether it is to study in Japan or just out of curiosity - there are a number of courses available in Africa and online. Below is a non-exhaustive list of Japanese courses.
Learn in your country
Japanese Language Teacher's Association in Madagascar (JALTAM)
Japanese Language Proficiency Test (JLPT)
If you are interested in acquiring a certified level of Japanese, you could take a Japanese Language Proficiency Test (JLPT).
Examinations of JLTP are usually held once or twice a year (usually in July or in December) in Accra (Ghana), Nairobi (Kenya), Abidjan (Côte d'Ivoire), Kinshasa (Democratic Republic of Congo), Cotonou (Republic of Benin), Antananarivo (Madagascar), and Johannesburg (South Africa).
The full list of test centres and hosting institutions are available here. Please contact them directly for the latest exam schedules.