Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > Java

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 03-30-2006, 02:13 AM
leospyder leospyder is offline
Registered User
 
Join Date: Feb 2006
Posts: 8
Unhappy please help with this stupid assignment

coin

Last edited by leospyder; 02-05-2009 at 01:13 AM.
Reply With Quote
  #2  
Old 03-30-2006, 10:44 AM
leospyder leospyder is offline
Registered User
 
Join Date: Feb 2006
Posts: 8
can anyone help?
Reply With Quote
  #3  
Old 03-30-2006, 05:58 PM
anubis anubis is offline
Registered User
 
Join Date: Dec 2005
Posts: 97
use this code to determine the maximum number of times in a row heads showed up:

Code:
if(myCoin.toString().equals("Heads"))
{				
	currentRun++;
				
	if(currentRun > maxRun)
	maxRun = currentRun;
}
else
{
	currentRun = 0;
}
and the just output maxRun after your for loop. is that all you needed help with?
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Assignment Operator, Returning const reference codemonkey32 C++ 6 02-06-2006 05:39 PM
assignment operator rssmps C++ 5 12-19-2005 06:10 AM
Avoiding default copy constructor and assignment operator.. premartha C++ 3 10-21-2005 11:06 AM
Help: need feedback on my Java assignment about thread sleep. It's already coded. sparkette Java 2 07-02-2005 01:35 PM
Stupid color assignment to label problem Patrick Ireland .NET 3 03-04-2002 08:54 AM


All times are GMT -4. The time now is 12:46 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.