welcome!  login / sign up
    search
Read and share stories on your mobile phone™

25489
How do I read this
on my phone?

330 Java Tips
Wattcode: 25489

3



- tags -
330 JAVA TIPS ••••••••••••••••••••••••••••••••••••••••••••••• Applets Code Examples Databases & beans Distributed systems File Systems - I File Systems II Graphics, AWT, Swing-I Graphics, AWT, Swing-II General Java - I General Java -II General Java -III General Java -IV General Java -V Java Hardware Job, fun... Miscellaneous-I Miscellaneous-II Networking OSs & Java Servlets & Servers Threads Sound & Multimedia String, text, numbers, I/O- I String, text, numbers, I/O- II About Book About Author Excuse me for possible mistakes! English is not native language for me. I will be glad if you send me your corrections of my mistakes! (c)1999, 2000, 2001, 2002, 2003 http://JavaFAQ.nu All rights reserved worldwide. This document can not be changed, either in whole or in part without the express written permission of the publisher. All questions please Receive our newsletter with new tips! More than 13,500 subscribers (by July 2003) can not be wrong! They read our tips every week! To subscribe to "The Java FAQ Daily Tips" weekly edition newsletter send email with "subscribe" word in the header and the body (write just subscribe without ""!!!) to: javafaqtips-request@javafaq.nu or on the web: http://www.javafaq.nu/plm2html/my_subscription.shtml Code Examples Code example: I want to show you one funny thing! The code is shown below is simplest that you can imagine and does very unusual thing! It is slightly bigger than "Hello World!" program but does much more. It lists all files in the current directory if you run it like this: java test * (of course after compilation) in DOS/CMD prompt on Windows or in any shell in UNIX. The program shows all files both in Unix and Windows. If you do: java test .* on UNIX it also shows all hidden files. class test{ public static void main(String args[]){ for (int i = 0;i < args.length; i++) { System.out.println("File " + i + ":" + args[i]); } if (args.length<=0) { System.out.println("No files!"); } } } You can ask how can we get this list without any file handling functionality in the code? Indeed looks mysterious... But in reality everything is very simple. When you type "*" (wildcard) OS (DOS, Windows, UNIX), not Java (!!!) sends the list of files in the current directory to your program as a list of parameters. And you see this list... -- AP (JA) Q: Can anyone answer this - basic, it seems, despite which the answer eludes me completely - question: how do you have multiple windows in Java without using JDesktopPanes and JInternalFrames?? I don't want that kind of environment. I basically want to be able to press a button/menu option to open up a small menu of options/input/buttons like the tools->internet options menu of IE, and I have no idea how to do it. Is it actually possible without using JDPs and JIFs? Is it as simple as creating a separate class for the menu 'mini-window' and creating an instance of it from the main system? Answer:...

Show full text: 346,794 characters
Add this button to your web page!
AddThis Social Bookmark Button

Comments & Reviews


Be the first to comment on this!

Login to add your comment.


Recommended


Java Atbp.

Java Head

java interview questions-2

java interview questions-1

92 tips

pro ana tips

Dating tips