This week's book giveaway is in the Java in General forum.
We're giving away four copies of Java by Comparison (eBook) and have Simon Harrer, Jörg Lenhard, Linus Dietz on-line!
See this thread for details.
Win a copy of Java by Comparison (eBook) this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error with string array  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following class in my Android project:



I use CompletaEspacos method to populate an array of strings. It places title in the index 0 and data in the index 1. However, when using CompletaEspacos it displays the indices different from each other. Does anyone know where I went wrong?
 
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure what you mean. I can barely follow the logic, but it looks like you are getting a table of date, then for each row of data you are putting all the values into a String where each value is a fixed-length (20 characters long).

What I don't understand is:
1) Why?
2) The CompleteEspacos method doesn't do any display, so I don't understand why you say "when using CompletaEspacos it displays the indices ...".
3) What do you mean 'different from each other' mean? Different how?

I think you need to explain it better. What exactly do you expect to happen. What exactly does happen. What exactly is the difference. If you can attach pictures that show what is happening and what you want to happen that might be easier to follow.
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
Thread Boost - a very different sort of advertising
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!