Tuesday, February 18

Sentinel Value using Break point in Java



Hi ALL,

Here I wrote a program for Sentinel Value using Break point  in java Example 2.

/**
 *
 * @author Balamurgan M
 */
import java.util.Scanner;
public class SentinelValue {
    public static void main(String arg[]){
        System.out.println("Sentinel Value");
        Scanner in=new Scanner(System.in);
        System.out.println(" enter the break point number ");
        int breakPoint=in.nextInt();
        for (int i=0;i<5000;i++){
            System.out.println(i);
            if(i==breakPoint)
                break;
           
        }
        System.out.println("break point is worked");
    }
}

No comments:

Post a Comment

Backup files to google drive using PHP coding

 Dear All, To backup files to Google Drive using PHP coding, you can use the Google Drive API and the Google Client Library for PHP. Here...