I want to create a method such that if i call that from any class it should get the class name from which the method has been called and can also print the class name.
            Asked
            
        
        
            Active
            
        
            Viewed 61 times
        
    1
            
            
        - 
                    1http://stackoverflow.com/questions/1069066/get-current-stack-trace-in-java – Amir Afghani Jun 27 '15 at 05:08
- 
                    You could also use `Foo.class.getSimpleName()` – Michael Jun 27 '15 at 05:11
- 
                    @AmirAfghani Thanks Amir Afgani that helped in solving my problem – Harshit Gupta Jun 27 '15 at 09:44
