What method should the companies follow so that the fresher is 'up-to-the-mark'?
Lets start with classroom training. This method generally help you know the subject, theory or some examples.It gives you the basic idea of what is what, what you need to know. For example Algorithms, SDLC, methodologies which you cannot learn on the job that well. If the group you sit with ask a lot of questions, you will be learning their point of aspect on the topic and learn different perspective of the topics.
I am not that interested into the online training for a new graduate, as you might not have the face to face conversations or the group training in the classrooms. However this will help, for a little advanced people with less or no time because you just have to learn them to do stuff which you already have an expertise on. However, you have to understand this is just my opinion and I could be totally wrong.
Coming the on-the-job training, this method has few great things and few bad things. You can learn some things only on the job because you will have real circumstances and real issues to face. For example, if you are a DBA(Database Administrator) you will not know if you give permission to do something on a particular Database, will affect some application in a big way unless you practically see and know it. When you are coding some piece in the current application you will be able to focus how it fits into an application and what issues might come like memory issues, session issues, security issues and other stuff like this in the actual environment. However the bad thing, you cannot learn everything on the job. You should have the theoritical knowledge to back it up to seamless fill in the gaps what happens why?
Classroom training teaches you what happens when you do something. And on-the job training teaches how you can resolve, get rid of or the get the best of the current situation. Both are needed in their own ways.