• Post Reply Bookmark Topic Watch Topic
  • New Topic

site with examples?  RSS feed

 
Ryan Bishop
Ranch Hand
Posts: 143
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Does anyone know of a site where they have java examples with notes about what is being done? I don't mean something like "Hello World" but programs that are pretty long.

Thanks.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan Bishop wrote:Does anyone know of a site where they have java examples with notes about what is being done? I don't mean something like "Hello World" but programs that are pretty long.

I hate to say, Ryan, but that's an incredibly vague question. "What is being done"? To what? Where? Why? And what's "pretty long"?

Far better, if you're having trouble with something specific, tell us what it is ... and (most important) what you don't understand.

But a general "tell me about how Java works"? Sorry chum; it's tutorial time.

Winston
 
Ryan Bishop
Ranch Hand
Posts: 143
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was more just looking for source code so I can look at various ways programs are created. I really struggle with defining methods and then knowing what does/can/cannot go in them. I look at the tutorials site a lot but they often do something like:

public double calculateAnswer(double wingSpan, int numberOfEngines,
double length, double grossTons) {
//do the calculation here
}

The problem is I don't know what "do the calculation here" part would necessarily be. It's not just that example but more not really understanding overall how to work with different methods and what goes in the body. Was just curious. No biggie.
 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you manage to find any Ryan? I often find myself looking for sites like this?

The only one I can offer you is coding bat!
 
Knute Snortum
Sheriff
Posts: 4287
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might benefit from a book like The Java Cookbook.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan Bishop wrote:I was more just looking for source code so I can look at various ways programs are created. I really struggle with defining methods and then knowing what does/can/cannot go in them. I look at the tutorials site a lot but they often do something like:

public double calculateAnswer(double wingSpan, int numberOfEngines,
double length, double grossTons) {
//do the calculation here
}

The problem is I don't know what "do the calculation here" part would necessarily be.

Well, in that case it's just a "generic" calculation method.

What if it said:would that make it any easer? (The calculation is actually listed on the Wikipedia page).

It's basically the same thing; they just didn't bother with a specific calculation method because the actual code (ie, what it does) isn't relevant.

HIH

Winston
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously ask the questions here first. Nothing better than this forum for that, provided you show some effort.

As for sites with code snippets and text to support the source code, I have always found http://www.javacodegeeks.com/ to be decent.
 
Ryan Bishop
Ranch Hand
Posts: 143
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James Boswell wrote:Obviously ask the questions here first. Nothing better than this forum for that, provided you show some effort.

As for sites with code snippets and text to support the source code, I have always found http://www.javacodegeeks.com/ to be decent.


Thanks.
 
Guillermo Ishi
Ranch Hand
Posts: 789
C++ Linux Python
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ryan Bishop wrote:Hi,

Does anyone know of a site where they have java examples with notes about what is being done? I don't mean something like "Hello World" but programs that are pretty long.

Thanks.


This is good. They cover other languages too.

http://www.tutorialspoint.com/java/
 
Campbell Ritchie
Marshal
Posts: 56581
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guillermo Ishi wrote: . . .
This is good. . . .
http://www.tutorialspoint.com/java/
I looked up one of the Java tutorials, for “Data Structures” and it seems very out of date.
 
Alice Hampton
Ranch Hand
Posts: 217
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of the stuff in cookbook would depend on his leveling of knowledge I guess though! I have it myself and whilst some parts are good I feel I can't understand some of them as they can get a bit complex.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alice Hampton wrote:Some of the stuff in cookbook would depend on his leveling of knowledge I guess though! I have it myself and whilst some parts are good I feel I can't understand some of them as they can get a bit complex.

But I think it's then important to work out what it is that you don't understand.

Is it the language? The code? The fact that things are "moving too fast"?

The problem for (some of) us is that it's a long time since we were learning the basics. Most of try to remember the stuff that we had trouble with, but we don't always get it right, which is why we need your input.

In the case of Ryan's example, he seems to be worrying about what the code in the method should look like, when it's probably irrelevant. But I say 'probably', because I'm not absolutely sure.

Now, if he could tell us what would help him to understand that example better, that would be a huge help.

Do you follow my reasoning?

Winston
 
Sundararaj Govindasamy
Ranch Hand
Posts: 46
Hibernate Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Folks,

I would like to suggest http://www.mkyong.com/.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!