• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Seeing java in action

 
Greenhorn
Posts: 14
Firefox Browser Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you guys think of a website with resources where I can see simple java code in action? I mean like a program that calculates a coin flip chances, 50/50?

I know I can right click on games and some website apps and see code, but it's 10000 lines and not all of it makes sense.

Looking for a refresher set of code lines if that makes any sense.
I mean beyond the most basic "hello world" applications that just generate one printout line

Thanks
 
Ranch Hand
Posts: 789
Python C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know of anything like that, but somebody might.

Write yourself the application you described. Read the milliseconds from the system clock and if the number is even print heads and if the number is odd print tails. Then instead of running it from Eclipse go to the debugger screen and execute the code one line at a time. Choose "step over" from the menu to execute a line at a time. That whole program would just be a few lines. Next revision you could display a picture of heads or tails instead of printing the words reusing almost all of the old code, and so on. Whatever you can imagine. Whatever is new and useful.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you already know the basics then it's better to write your own apps step by step. That way you would understand how your own code works. More importantly why you wrote it that way.

You can always check out the Java tutorial here for the relevant topics you feel rusty on.
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What about this site?
 
This one time, at bandcamp, I had relations with a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic