Results 1 to 3 of 3
- 01-14-2012, 10:28 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 7
- Rep Power
- 0
idiot question, I know but I am a total beginnner, please forgive me.
I am new to java and this site, so first thanks for reading this.
I am trying to learn java and I have a book called thinking in java, it seems to be a good book.
There is a line of code that just confuses me a bit and I would like some clearification about it.
int storage(string s)
return s.length() * 2;
This is total beginner stuff I know.
the very first part is what confuses me, why is storage there? int initializes an intiger, (string s) is makeing a string called s, and return s.length() returns the lenght in bytes of s.
I just dont know why the word storage is there.
Any help is appreciated
Thanks
- 01-14-2012, 10:53 AM #2
Re: idiot question, I know but I am a total beginnner, please forgive me.
- 01-16-2012, 06:23 AM #3
Member
- Join Date
- Jan 2012
- Posts
- 7
- Rep Power
- 0
Re: idiot question, I know but I am a total beginnner, please forgive me.
ok thanks so lets see if I got it this time...
so int is the reurntype storage is the method(string s) is the argument.
The method names and class names he uses in this book connfuse me sometimes.
thanks for the link
walkswithzombies
Similar Threads
-
(Me <= idiot)?
By truant420 in forum AWT / SwingReplies: 8Last Post: 03-11-2011, 05:31 PM -
Calculating Total?
By ethemartian in forum New To JavaReplies: 6Last Post: 02-21-2011, 04:09 AM -
Java idiot...help!!!
By usa100 in forum New To JavaReplies: 2Last Post: 01-05-2011, 02:49 PM -
Printing total out
By denisdoherty in forum New To JavaReplies: 1Last Post: 04-25-2008, 06:40 AM -
Am I an IDIOT ?????????????
By Mandilon in forum New To JavaReplies: 1Last Post: 02-02-2008, 08:56 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks