Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Felix Putra
Python Web Development Techdegree Student 1,927 PointsWhat does "void" mean in "public void" ?
Hi everyone, sorry for asking too many questions because I'm new to java and other programming languages.
I have managed to browse google and still confused about void.
what does this "public void" mean compared to just "public"?
Thanks!
1 Answer
William Li
Courses Plus Student 26,868 PointsIn, Java
- void keyword means that the function/method has no return value.
- public void, now this is 2 keywords here, void has been explained in the previous line; and public keyword is an access level modifier.
From Oracle Java doc https://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html
A class may be declared with the modifier public, in which case that class is visible to all classes everywhere. If a class has no modifier (the default, also known as package-private), it is visible only within its own package