Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
9

9002code

@9002code
About
Posts
3
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • label in java
    9 9002code

    thanks. that is ok.. but it's not good solution for my problem. ok, i tell all thinks.... i develop a math program where a loop run apporoximat 800000 time and finaly value is came. in c++ there are goto statements and control jump to backword or forwared where we need. like that i need jump my code if my condition false and if true the loop exit.. so i can't use function. and it's a reason i send my code like that... so if u do please help me..

    Java help c++ java question

  • label in java
    9 9002code

    class jumping
    {
    public static void main(String[] args)
    {
    int b,c;
    float a;
    b=8;
    c=2;
    test:
    {

    a=b/c;
    System.out.println("a first is" +a);
    while(a<=10)
    {
    b++;
    System.out.println("b in continue is " +b);
    if(b==12)
    {
    break test;
    }
    System.out.println("a final is" +a);
    continue test;
    }

    }
    }
    }

    i want if b not equal to 12 then "a final is" is print. and b increase and also a is but it not? "kindly help me in java for using label/jump like goto in c++"

    Java help c++ java question

  • label in java
    9 9002code

    class jumping{ public static void main(String[] args){ int b,c; float a; b = 8; c = 2; test: { a = b/c; System.out.println("a first is "+a); while(a<=10){ b++; System.out.println("b in continue is "+b); if (b==12) { break test; } System.out.println("a final is "+a); continue test; } } } } i need final value of a is 6. but i can't? can you solve this? there are error in "continue test" statements, it give not a label? i need there code jump to label test like goto in C++? Kindly help me????

    Java help c++ java question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups