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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Shafeeq Ahmed](https://secure.gravatar.com/avatar/c5ad8e73bd9a0a6a6af026fa042b0fa3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Shafeeq Ahmed
6,058 PointsFunctions?
I have explored some other programming languages and In those languages we could create function to group our code and call them later. Is that possible in java? I am not talking about object methods.
3 Answers
![Simon Coates](https://secure.gravatar.com/avatar/9c452f3f160ef69f85f1ff042db63980?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Simon Coates
28,694 PointsHistorically not really. But you could create a static function that wouldn't require an object to call it. Java 8 has something called a lambda function that people discuss in terms of being functional. But historically java is object oriented and loose functions tend to be associated with a different programming paradigm. (it's confused a little since some OO languages - PHP for instance - aren't pure OO, making the conceptual difference murkier).
![Shane Robinson](https://uploads.teamtreehouse.com/production/profile-photos/3923762/micro_WP_000010.jpg)
Shane Robinson
7,324 PointsIt's not exactly the same, but it sounds like an Interface might be what you are looking for.
![Shafeeq Ahmed](https://secure.gravatar.com/avatar/c5ad8e73bd9a0a6a6af026fa042b0fa3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Shafeeq Ahmed
6,058 PointsThanks guys
Muhamed Asil
7,453 PointsMuhamed Asil
7,453 Pointsin Java you can call a function, object or class. is it useful?