473,387 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to increase the size of the string?

Hello,
I'm having problem in developing my program.
I'm getting an exception "StringIndexOutOfBoundsException: String index out of range : 99"
I guess this is the problem of size of the string.
I'm reading the string from a file.
Expand|Select|Wrap|Line Numbers
  1. While((s=bufferedReader.readLine())!=null)
  2. {
  3.     System.out.println(s);
  4. }
Please help me out.
Jan 16 '16 #1
1 1815
chaarmann
785 Expert 512MB
I do not understand. Where do you accesss s[99]? Can you show us this code?

You can increase the size of the string by just adding spaces to the end. But why would you want to do that?
Why not just first checking the size before accessing by index?
Jan 18 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: dba_udb | last post by:
We need to increase the space of DB2 catalog on OS/390. As these are user managed, I feel we may need to take an outage to increase the space. Is there a way to avoid outage? Is ONLINE REORG...
13
by: cvh | last post by:
Hello, In delphi I could do this : Var Str: String (String of size 2char) How would I do this with VB.NET in CF? Thank you,
2
by: yoshitha | last post by:
Hi Can any one tell me how to increase size of an array in C#.net with ASP.Net? its very urgent for me thanks yoshitha
9
by: Michel Racicot | last post by:
In some language, it's possible to specify a "predefined" size for string objects. Exemple: string which is a string of 10 characters. Is it possible to do this in C#? Thank you
5
by: Vinutha | last post by:
I have created one webpage for our website. but when i view that page in a wide screen monitor, the page is alligning left. ie. right part of the screen its giving blank. how to justify the...
2
by: Tom Lee | last post by:
hello. i use commonDialogBox in visual basic 6.0 for open file but the contol has short size file browsing box and i want to increase the size or add horizental scroll bar How can i do this? ...
1
by: Aditya Malhotra | last post by:
my access db size is 2 gb, now my data is increasing i.e. more than 2 gb, here when i run some query it gives error. how can i increase size of db from 2 gb to more . please help
9
by: raashid bhatt | last post by:
does having more variables increases the size of program.
1
by: nagmvs | last post by:
Hello I am unable to upload More than 200kb in to my server and also i can downlaod only less than 4MB file from my server .When i am searching in internet i found solution as u can...
0
Suresh Mahesh
by: Suresh Mahesh | last post by:
In vb.net i doing some projects. In my projects while debugging or installing my projects text boxes and labels etc are in the same size . i want increase size of the text box, labels etc are...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.