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
-
How to use assert with wireless toolkit?
Hi,
I am trying to find out how to use assert with wireless toolkit. I have found that I need to pass "-source 1.4" to the java compiler. But I can't find any documentation on how to do it.
I'm using J2ME Wireless Toolkit 2.2.
thanks
LuddeHere's a quote from an article on Java World at http://www.javaworld.com/javaworld/jw-11-2001/jw-1109-assert.html
"To support the new assertion facility in J2SE 1.4, the Java platform adds the keyword assert to the language, an AssertionError class, and a few additional methods to java.lang.ClassLoader."
So I really think it's part of 1.4. -
How to use warn about changes property with page menus
how to use warn about changes property with page menus
Hi,
If u will enable this property, then u will get warning message as a popup in case of change of state of VO.
Regards,,
Gyan -
I need to learn how to use all about java & mysql...help me!
I have a situation here, I need to learn how to use java with mysql
. Can I connect to a MYSQL DB with servlets?
how can I build an e-mail server with java (no matter how difficult)
please, I need help, and I really apreciate your help.
thank you very much!!I have a situation here, I need to learn how to use
java with mysql
. Can I connect to a MYSQL DB with servlets?Yes... documentation to help you connect to any database can be found at http://java.sun.com/products/jdbc. To connect to MySQL, you'll need drivers (sourceforge.net), and the specific connection URL for those drivers will be included in the documentation.
how can I build an e-mail server with java (no matter
how difficult)If you're fairly new to JSP/Servlets, you may be in over your head here, since an email server is no easy application to code. Here's a link to the source code for the JAMES project... Apache's Java email server... maybe you can find some useful information there...
http://www.ibiblio.org/pub/packages/infosystems/WWW/servers/apache/jakarta/james/source/ -
How to Use " ASSERT ID " , in the programm and what is the use of it?
Hi,
friends,
I wanted to write a program (TEST CASE) by using ASSERT ID . But i got the description (Hint) like what iam mentioning below:
*" Detects uses of ASSERT ID and flags cases where there is code to be executed after the command. In production environments ASSERTS are disabled, as a rule, therefore this code gets to be executed. "
So, let me know the Use of this key word with some example .
Thanks & Regards,
P.N.KumarHi,
Please look for F1 on this keyword. Also look at "Checkpoints".
Check this link.
http://help.sap.com/erp2005_ehp_02/helpdata/EN/9b/b1b64104e52f31e10000000a155106/frameset.htm
Regards,
Srini. -
Hi,
I have a document that is about car. I would like to ask whether I need to create a "THEME' for this document by myself before I can use the query 'about(car)' to search the results? If yes, please teach me how to do so. Because I thought that the theme will be generated by the system automatically and I already waste many days to fix the problem. Please kindly to help me to fix this problem.
Many thanks in advance.
EdwardYou don't need to have a theme component in the index to issue ABOUT queries in English. However, having a theme compoenent in the index yields the best results for ABOUT queries.
Something like this
begin
ctx.ddl.create_preference('mylex','BASIC_LEXER');
ctx_ddl.set_attribute('mylex','index_themes','YES');
ctx_ddl.set_attribute('mylex','index_text','YES');
end;
then ...
create index myidx on mytable(docs) indextype is ctxsys.context parameters ('LEXER mylex'); -
I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on. Then in a few seconds it goes black, never having brought up a screen to do anything! Help! What do I do to get this thing going?
You might consider connecting it to the charger and charging up the battery overnight.
Please Get the iPod Touch User Manual for iOS 5 -
I would like to change my apple id to a different email because the one i am currently using I dont use as my email address anymore but we I tried to change it in manage apple ID it said I already have that email address as one of my accounts but I never created and apple ID with that email address. how do I go about this
The following article may help you:
http://www.ehow.com/how_8362857_rename-mailbox-apple-mail.html -
Someone used my email address to create an Apple ID. I logged in to appleid.apple.com and I changed the password because it is freaking me out. I want to report it to Apple but dont know how to go about it. I want the Apple ID deleted. How do I go about that? Is there also a way to ensure that the email address wont be used again by this person to create another Apple ID?
This is compounded actually by a Gmail issue. I have had this email address for ages, since the start of the beta. But lately in the last year or so, I am getting mail that seems to be intended for other people but it is using my email address. It is probably one of them who created the Apple ID.Contact iTunes support: https://getsupport.apple.com/Issues.action
-
I have 4 equal oblong shape created with borders How do I go about knowing what size the selection area is so that I can crop an image to fit. I don't want to use paste in then adjust the bounding box to suit
What do you mean a moderator
-
How do i go about linking 2 laptops 3 ipads using the same itunes and to stream all films and music
how do i go about linking 2 laptops, 3 ipads using the same itunes and to stream all films and music through the house.
make sure they are all using the same itunes store account and turn on home sharing
http://support.apple.com/kb/HT3819 - more info about home sharing
-mvimp -
Using what I believe is the app Image Capture, exactly how do I go about scanning and attaching a PDF document in order to email it? After scanning it I'm having trouble locating it while attempting to attach it to an email. Thanks.
At the bottom left of the Image Capture window is a drop down menu called Scan To which will let you choose where your scan will be sent. Create a folder on your desktop named Scans and send your scans to it. Then rename the scan to whatever will help you remember what it is.
Then when in Mail you can click on Attach and find the Scans folder and attach your scan. -
Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.
Use it the same way as previously.
ctrl B shows the menus.
ctrl S shows the sidebar.
What else do you need help with? -
I would like to sync Notes between my MacBook Air and the IPhone and/or IPad. I used to tick a box in Itunes (info), but for some reason it is no longer there. How do I go about doing the sync?
The only way to sync Notes is through a mail server. If you don't want to use iCloud, you'll have to use some other mail account, or run your own mail server under OS X Server. The latter is a job for advanced users only.
-
I have problem in signing in I don't like read and accept terms I cannot access this I don't know about this read and accept terms this is poor, I just like android's simple option and simple singing in, but how to use apple I'd?
Your computer is called an iMac.
Did you turn proxies on? If so, you should turn them off.
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
-
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