摘要:
1import java.util.Scanner;
2
3public class StuManager {
4
5 /** *//**
6 *&...
阅读全文
import java.util.*;
public class Bool
{
public static void main(String args[])
{
Random rand= new Random ();
int i=rand.nextInt()%100;
int j=rand.nextInt()%100;
System.out.println("i="+i);
System.out.println("j="+j);
System.out.println("i>j is "+(i>j));
System.out.println("i<j is "+(i<j));
System.out.println("i>=j is "+(i>=j));
System.out.println("i<=j is "+(i<=j));
System.out.println("i==j is "+(i==j));
System.out.println("i!=j is "+(i!=j));
System.out.println("(i<10)&&(j<10) is "+((i<10)&&(j<10)));
System.out.println("(i>10)||(j>10) is "+((i>10)||(j>10)));
}
}
public class guanxi
{
public static void main (String args[])
{
float a=10.0f;
double b=10.0;
if(a==b)
{
System.out.println("a和b相等");
}
else
{
System.out.println("a和b不相等");
}
}
}
public class autoinc
{
public static void main (String[] args){
int i= 1;
System.out.println("i:"+i);
System.out.println("++i:"+ ++i);
System.out.println("i++:"+ i++);
System.out.println("i:"+i);
System.out.println("--i:"+ --i);
System.out.println("i--:"+ i--);
System.out.println("i:"+i);
}
}