I wrote a program in C++ with some goto statements. Now, I need to write the same program in Java. Is there any goto option in Java? If so, how it can be implemented? Is it same as the C++?
My program is:
#include<stdio.h>
#include<conio.h>
void main()
{
    int i,j,k,w,l,q,d;
    clrscr();
    printf("\nEnter the limit:");
    scanf("%d",&k);
    for(i = 13; i <= k ; i++)
    {
        repeat:
        j = i%10;
        if (j != 0)
        {
            if(i < 99)
            {
                for(w = 1; w <= 9; w++)
                {
                    l = 11*w;
                    if (l == i){
                        i++;
                        goto repeat;
                    }
                }
            }
            if(i > 99)
            {
                for(q = 1; q<=9 ; q++)
                {
                    d = 111*q;
                    if (d == i){
                        i++;
                        goto repeat;
                    }
                }
            }
            printf("%d,",i);
        }
    }
    getch();
}
 
     
     
     
     
     
     
     
     
     
    