Whoo hoo I got it to store properly :-) here's the code in the end.
public String[][] simpleFileReader(String filename)
throws FileNotFoundException, IOException {
BufferedReader inFile = new BufferedReader(
new FileReader(pathSettings + filename) );
ArrayList al = new...
well i guess that completly wrong but i did manage to output an object for some reason :-) now im stuck with no idea of how to get the key and value to stay together. Anyway thanks for your help Sedj :-)
is my code right?
public String[][] simpleFileReader(String filename)
throws FileNotFoundException, IOException {
BufferedReader inFile = new BufferedReader(
new FileReader(pathSettings + filename) );
Vector list2 = new Vector();
Vector list3 = new Vector();
String line2, iKey...
I don't know how to enter my values into a 2 dimensional array using for loops then getting it the values for 1 column into a string[] type.
I got as far as setting up 2 arrays
String[][] stringList2 = new String[list2.size()][list2.size()];
but I want to enter a String name in the first...
I gave up using a stringTokenizer and got a substring instead. I'm using the indexOf for both the [] brackets and take the substring between then and squeeze it into an array,it works for now so im happy.
um and example would be
[Primary School] [1]
[Secondary School] [2]
[University] [3]
[Incomplete Primary School] [1]
I've tried using the code that I made but I got errors the following errors.
The method split(String) is undefined for the type String.
The method replaceAll(String)(String) is...
So I guess my code would look sort of like this?
BufferedReader inFile = new BufferedReader(
new FileReader("schools.txt") );
String line
while (inFile.ready())
line = inFile.readLine();
if (line.length() != 0){
String[] val1 = line.split("\\[");
for (int i =...
hi all. um is there a way to extract the values 1 and 2 from a text file containing
[value1][value2]
[another value1][another value 2]
and get rid of those stupid [] brackets?
Woo Hoo I got the current year out with
<script type="text/javascript">
<!--
var now = new Date();
var yr = now.getYear();
var fyr = (yr < 1900) ? 1900 + yr : yr;
document.write(fyr);
//-->
</script>
Now all I have to do is figure out how to get it to go 50 years back, pop it...
Im having trouble formatting the current date into yyyy, to be passed into a combo box with the years going back 50 and forward 50. Im new to jsp + html and java script <yes another newbie> Can you also provide a short example if not just direct me to other useful source of info on my current...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.