Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 188069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:56:18+00:00 2026-05-11T15:56:18+00:00

I like how Groovy makes all of your instance variables and class variables public

  • 0

I like how Groovy makes all of your instance variables and class variables public and writes getters and setters on your behalf. This saves a lot of unnecessary coding. On the other hand, my boss hates it, making me very sad 🙁

Is there a way to achieve the conciseness of Groovy in Java without having to use Groovy or some other framework/add-on?

I have a feeling the powers that be will not take kindly to the introduction of this foreign framework where I work.

So what I’m looking for is a solution to the excessive verboseness of Java without using Groovy or something like it.

Can it be done in Java alone – such as by simply making everything public?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:56:19+00:00Added an answer on May 11, 2026 at 3:56 pm

    Go with immutable datastructures. No getters, no setters, no hassle.

    You may want to give Functional Java a try. It’s just a regular Java library, but comes with powerful abstractions and useful (immutable) datastructures that let you say more in less code. For example, translate this:

    List<String> s = new ArrayList<String>();   for (String x : xs) {     for (String y : ys) {       for (String z : zs) {         s.add(doSomething(x, y, z));       }     }   } 

    … to this:

    List<String> s = xs.bind(ys, zs, doSomething); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems like Groovy was forgotten in this thread so I'll just ask the
like this: Groovy: map = ['a':1,'b':2] doubler = this.&doubleMethod map.each(doubler) println map What's the
may be too simple groovy question but....please help i have a list like this:
I've created a domain class in Grails like this: class MyObject { static hasMany
All variables seem to be global in my groovy scripts I run on groovy
I have a groovy string like this: String test = abc{ der} token: \330\272%\006\272W\264\000T\226\022[\310\2207#fs\032q
Is there an easy way to stub ALL methods of a groovy class? In
First, I have to say that I really like Groovy and all the good
If I have a string in Groovy like so... 'user.company.name' ... and I want
I am looking for how the methods like ArrayList#sort(Closure) are implemented in Groovy. I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.