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

  • Home
  • SEARCH
  • 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 8574669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:31:32+00:00 2026-06-11T19:31:32+00:00

Can a method present in the RequestContext method return void? If my RequestContext looks

  • 0

Can a method present in the RequestContext method return void?

If my RequestContext looks like this,

@Service( value = PersonUtil.class, locator = PersonLocator.class )
public interface PersonRequest extends RequestContext
{

    Request<void> testMethod( Long id );
    ......
}

I am getting this error:

Multiple markers at this line
– Return type for the method is missing
– Syntax error on token “void”, Dimensions expected after

Can we not create a method with return type void? If not, why is it so?

Thanks in advance.

  • 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. Editorial Team
    Editorial Team
    2026-06-11T19:31:33+00:00Added an answer on June 11, 2026 at 7:31 pm

    void is just like primitive types like int or boolean, you can’t use it as a type parameter.

    And just like you’d use Integer instead of int, you’ll use Void here (java.lang.Void)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can this method work? public String sayHello(){ return Hello.jsp?name= + laala; } I am
At present I am using this method to Redirect to different folders. private void
What tool or method can I use to see what code something like an
In UML sequence diagram a method can have only one return line (at least
in C# an internal class or method can only be called from within the
I have this helper method that I can't seem to clean up with content_tag
Given a method: def x(*a) Can calling it like so: x('foo', y: 'bar', z:
I download certain data, and when it's downloaded this method is called: - (void)connectionDidFinishLoading:(NSURLConnection
Which method can be used to read one line at a time from a
I read that the new delegate method can attach more than one event to

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.