Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Java
int limit = L.intValue();
        String k = kin.toString(2);


above code the variable limit is of int type , i want to write it in the for loop like for (int i = 1; i < K.length (); i++) and i am writing like for (int i = 1; i < K.length(limit); i++) but not exist how i am writing it inside the loop??

What I have tried:

int limit = L.intValue();
String k = kin.toString(2);
for (int i = 1; i < K.length(limit); i++)
Posted
Updated 23-Aug-16 11:33am

 
Share this answer
 
 
Share this answer
 
Comments
Member 12696466 22-Aug-16 2:46am    
but there is no proper explaination for looping?
Mehdi Gholam 22-Aug-16 3:01am    
looping of what?
Member 12696466 22-Aug-16 3:09am    
i want to write for (int i = 1; i < K.limit; i++)
similar like for (int i = 1; i < K.length (); i++) but it creating error
Mehdi Gholam 22-Aug-16 3:15am    
What is K?
Java



public class Conversions {

public static void main(String[] args)
{
// TODO Auto-generated method stub
// declarations
String Istring;
int x;
// Set values
x=10;
// Convert
Istring=String.valueOf(x);

}

}

I think the last line is what you are looking for.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900