Results 1 to 3 of 3
  1. #1

    Default for loop problem


    Code:
    import java.lang.Thread;
    
    public class TestLoop
    {
          public static void main(String[] args)
    {
          int sleep;
    
    
               for(int i=0;;i++)
                {
                   Thread.sleep(1000);
                         System.out.println(i); }
          }
    }
    unsa pa hinay dagan sa loop sa java?

  2. #2
    Code:
    public class delay
    {
    	public static void main(String[] args)
    	{
    		for(int i = 0; ; i++)
    		{
    			try
    			{
    				Thread.sleep(1000);
    			}
    			catch(InterruptedException e)
    			{
    				e.printStackTrace();
    			}
    
    			System.out.println(i);
    		}
    	}
    }

  3. #3
    Elite Member ramzeners's Avatar
    Join Date
    Feb 2010
    Gender
    Male
    Posts
    1,052
    Blog Entries
    1
    ^
    ^
    ^
    ^
    Sakto, butangan jud na exception.. Kabaw naka unsay exceptions?



    +InNoCeNtE dE tI+

  4.    Advertisement

Similar Threads

 
  1. Remedy for Eye problem
    By AMD_infinium05 in forum Fitness & Health
    Replies: 20
    Last Post: 05-20-2011, 12:57 AM
  2. problem for loop * c++
    By public7enemy in forum Programming
    Replies: 28
    Last Post: 02-21-2011, 01:26 PM
  3. Replies: 0
    Last Post: 05-23-2008, 10:12 PM
  4. Generic host process for win32 problem
    By chillax in forum Software & Games (Old)
    Replies: 2
    Last Post: 04-18-2007, 07:51 AM
  5. Help needed A.S.A.P for sound problem
    By ronninalpha in forum Computer Hardware
    Replies: 3
    Last Post: 09-11-2006, 10:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top