I learned all basic java classes and how to use them. I like to learn Android App Programming. But one of my colleague suggested me to learn EJB. What is the best to learn?
Android, because you think that is fun.
EJBs (Java EE) are rarely fun and it is your interest that will carry you through efter the initial interest has settled. It is best if you find a project using the technology you choose, that you will actively use as it will give you the most incitament to continue in the long run.
They are totally and completely unrelated.
So, if you want to learn some Android programming (to develop APPs for Android platform), go with Android.
If you want to learn some Application Server (Java EE) programming, go with EJBs.
If you don't have a particular goal I'd probably go with writing an Android app.
EJBs will look good on your resume, but if you are inspired to make an Android app that may go even further.
It's always easier for me to learn something if I'm doing so to solve a particular problem.
It depends on what your goal is. Are you learning for personal interest, or for potential marketability?
I don't know anyone who learns EJB for fun. Also, its usage is waning in favor of lighter weight frameworks like Spring. I'd recommend learning Java web application development using Spring/JSP/servlets/MVC framework for marketability in your career growth.
Learning Android would be fun, would develop your skills, and would also provide some value for future employment.
It depends on your,but I think If U are in university, U can practice with both ideas. And in future, U can choose better;)