ahsan askari

Greenhorn
+ Follow
since Oct 21, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by ahsan askari

class TryFor{
public static void main(String[] args){
int sum=0;
for(int i=0;true;i++)
{

sum+=i;
if(i>5)
break;
}

System.out.println(i);

}
}
this code is working but when i put false in place of true it is not compiling can someone tell me why?
i think it should compile but for loop will not execute?
22 years ago
how many byte does data type boolean takes
22 years ago
float and int takes same space in memory(same number of bytes),then why do we need casting whenever we go from int to float?
22 years ago