JAVA: Access getResourceAsStream() in static context

Typically, we are used to using:

SomeClassName obj = new SomeClassName();
stream = obj.getResourceAsStream();


Instead, we can access the method statically like so:

stream = SomeClassName.class.getResourceAsStream();

5 comments:

nisha said...

Great Post. The Article is Really admired.it is easily to understand the Concept for the Beginners.

Data Science Training Course In Chennai | Data Science Training Course In Anna Nagar | Data Science Training Course In OMR | Data Science Training Course In Porur | Data Science Training Course In Tambaram | Data Science Training Course In Velachery

aarthi said...

It is impressive blog..The article is good.
Java training in Chennai | Certification | Online Course Training | Java training in Bangalore | Certification | Online Course Training | Java training in Hyderabad | Certification | Online Course Training | Java training in Coimbatore | Certification | Online Course Training | Java training in Online | Certification | Online Course Training

devi said...


This is the exact information I am been searching for, Thanks for sharing the required infos with the clear update and required points. To appreciate this I like to share some useful information regarding Microsoft Azure which is latest and newest,
Data Science Training In Chennai

Data Science Online Training In Chennai

Data Science Training In Bangalore

Data Science Training In Hyderabad

Data Science Training In Coimbatore

Data Science Training

Data Science Online Training

Maneesha said...

Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post .
best data science training in hyderabad

Pavithra Devi said...

This post is so interactive and informative.keep update more information...
IELTS Coaching in Tambaram
IELTS Coaching in Chennai