How to use assert about jdk1.4

I write a Test java file to test the assert statement but fail to compile.
public class Test{
public static void main(String args[]){
int i = new Integer(args[0]).intValue();
assert true;
if(i%3==0){
System.out.println("good");
}else if(i%3==1){
System.out.println("better");
}else{
System.out.println("best");
What's the problem, and how to fix it?
Thanks!

you need to tell pass the compiler the -source 1.4 flag to get it
compile a class with assert.
see here
http://java.sun.com/j2se/1.4.1/docs/guide/lang/assert.html#compiling

Similar Messages

Maybe you are looking for

  • If I have 2 iTunes accounts, is there any way I can combine them into 1?

    I had used the same iTunes account until a few months ago. For whatever reason, my information could not be found so I made a new account. The issue I am having is that on my current iPhone, there are purchases made under both accounts. When trying t

  • Old fonts from System 7 & Mac OS 8 & OS 9: Safe to install in 10.6.4?

    I've been accumulating fonts for years and years. I recently got a new MacBook Pro and it's now running 10.6.4. I still have, backed up on an external drive, hundreds of freeware, shareware and pro-level fonts which I acquired way back in the distant

  • How to view wide files in SAP

    We are currently using transaction AL11 in order to allow users to view files that have been placed in the /usr/sap/<sid>/INTERFACE directory, however we just noticed that AL11 only allows you to view files at are 255 characters or less in width. Can

  • Flash player undownloadable...help!

    Every time I try and download the Adobe Flash Player, instead of having the yellow box show up as an option to click download file, or a box that shows up asking to download it, there is no box that shows up. there is just a box on the page that has

  • 10.2.0.4 for "non-mainstream" platforms - release date?

    According to SAP on Oracle --> SAP on Oracle Development Update patch 10.2.0.4 for non-mainstream platforms (Windows IA64, Linux IA64 etc.) was to be released "in August", now we have mid september and patches are still not available. Any idea why th