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 8576137
In Process

The Archive Base Latest Questions

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

input: this is a line output: this is a line the idea is that

  • 0
input:
this is a line

output:
this
is
a
line

the idea is that the user will enter one line and then it will be printed out one word at one line and then going on.
buffer and inputString are variables of String.

    for (int i=0;i<inputString.length();i++){
        if(Character.isLetter(inputString.charAt(i))){
            buffer += i;
        }// end if
    }// end for i

to end it all with my cool error message.

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
    The local variable buffer may not have been initialized

I’m quite new to java coding and I know there are many other ways to solve this task like using the split() and some others. But my sadistic teacher want me to use the isLetter() for this one.

  • 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:51:30+00:00Added an answer on June 11, 2026 at 7:51 pm
    Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
        The local variable buffer may not have been initialized
    

    means that you have declared a variable, (maybe a String?) but not initialized it.

    Replace

    String buffer;
    

    with

    String buffer = ""; 
    

    I’m not sure what your loop does exactly, adding the counter to anything doesn’t really make sense to me, but that’s another story.

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

Sidebar

Related Questions

This is one line of the input file: FOO BAR 0.40 0.20 0.40 0.50
I'm trying to open a file for input in Excel with this line :
What I'm hoping for is something like this: Input: a aa b bb Output:
i want the following functionality. input : this is test <b> bold text </b>
std::vector<bool> reprVectors::encode(std::vector<float> input){ std::vector<float> distance; for(size_t i=0;i<this->reprVectorsList.size();i++){ distance.push_back(distBtw(input,this->reprVectorsList[i])); } std::vector<float>::iterator it= min_element(distance.begin(),distance.end()); return this->reprVectorsList[it]->code;
I have this input text and an input button...I am looking to have them
I have this input text and input button, I am trying to get them
I have this input form which goes like this: <input type=checkbox name=vehicle value=Bike />
In IE8 this input.attr(name,exam.exam_Normal[' +normal_id_unique + '].boolean_v); Outputs this only in IE8.... <input propdescname=exam.exam_Normal['1'].boolean_v
So given this input string: =?ISO-8859-1?Q?TEST=2C_This_Is_A_Test_of_Some_Encoding=AE?= And this function: private string DecodeSubject(string input) {

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.