AllExperts > Java 
Search      
Java
Volunteer
Answers to thousands of questions
 Home · More Java Questions · Question Library  · Free Encyclopedia ·
More Java Answers
Question Library

Ask a question about Java
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
About Ziv Ben-Eliahu
(Top Expert on this page)

Expertise
I can answer questions relating to: Java language and usage, coding standards, application modeling and design (model driven development), unit/system testing, test driven development, algorithm complexity issues, Ant and XML-technologies.

Experience
I'm in the software industry for over 4 years now. I worked mainly with Java, but also with other languages. I gave practical session for "System Programming", in university.

Organizations
Open-Source community

Publications
WikiAI08

Education/Credentials
B.Sc. in Math and Computer Science, BGU.
M.Sc. in Computer Science, BGU.

Past/Present Clients
Open source (and free) projects: D.U.C.K (source-forge), JXN for wireXN.

Organizations
Open-Source community

Publications
WikiAI08

Education/Credentials
B.Sc. in Math and Computer Science, BGU.
M.Sc. in Computer Science, BGU.

Past/Present Clients
Open source (and free) projects: D.U.C.K (source-forge), JXN for wireXN.

Publications
WikiAI08

Education/Credentials
B.Sc. in Math and Computer Science, BGU.
M.Sc. in Computer Science, BGU.

Past/Present Clients
Open source (and free) projects: D.U.C.K (source-forge), JXN for wireXN.

Education/Credentials
B.Sc. in Math and Computer Science, BGU.
M.Sc. in Computer Science, BGU.

Past/Present Clients
Open source (and free) projects: D.U.C.K (source-forge), JXN for wireXN.

Past/Present Clients
Open source (and free) projects: D.U.C.K (source-forge), JXN for wireXN.

   

You are here:  Experts > Computing/Technology > Focus on Java > Java

Questions Answered By Expert  Ziv Ben-Eliahu 
In Category  Java

SubjectDate Asked

java performance and full control of the hardware11/17/2009
  Q: I was thinking if java can take the advantages of C++ in performance(speed) and full control of the ...
  A: Some years ago Java was solwer than C++. Now days, Java 1.6 can be faster than C++. Both Java and ...
Counting sub-sets11/14/2009
  Q: Can you please tell me this program? I would greatly appreciate it! I dont even know how to begin ...
  A: We know that there are 2 by the power of the set size possibilities. For example, this set's size ...
Output to file11/12/2009
  Q: please tell me how to save the output into a text pad. the following code is showing output in ...
  A: You have two easy ways: 1) when running the Java program redirect the output into a file: Usually ...
calling an array from constructor11/10/2009
  Q: I am writing a program about a long jump competition. At the being the program you state how much ...
  A: There are a couple of things you should consider. 1) Why are using array int[] and not ArrayList? ...
Swing, Logic-circuit11/8/2009
  Q: Sir, plz am jus a beginer in java, i want to write a program using swing gui to build logic circuits ...
  A: I can't give you code as this task is a bit complicated and seems like a homework. I can give the ...
Classpath usage11/6/2009
  Q: Good day there! I have here a link to a built-in class of what I am going to use, but I don't know ...
  A: Don't extract the JAR file. If you use an IDE (such as Eclipse or Intellij) then you should go to ...
Class usage11/2/2009
  Q: Good day there! I have here a link to a built-in class of what I am going to use, but I don't know ...
  A: The link is for the statistics methods in class rvl.stat.dist.Tukey. I am not an expert in ...
Stop Words10/31/2009
  Q: Sir, I want to make a program which can remove the stop words. I tried to do it using StopWords ...
  A: I'm sorry but there isn't enough information to answer this question. What is the full name of the ...
file io10/22/2009
  Q: I was looking at some examples on basic file IO in java, but what i notice is that there are many ...
  A: There are some practices that should be kept when reading and writing files. See here, for example: ...
Java application - login and connect to DB10/20/2009
  Q: Respected Sir, I am given a task to create an Employee Database for an organisation.I ...
  A: Your problem is indeed clear. But you have not answered my questions. Where is you data [eg.: ...
Maximum/Minimum10/20/2009
  Q: I am struggling with finding maximum and minimum out of a set of data NOT in an array. The task was ...
  A: First the MIN problem, then about an array. (1) If you didn't set an initial value to 'minimum' then ...
Finding Fastest Solution to Maze Using Stack10/19/2009
  Q: Hey, I am having issues finding the fastest solution to a maze. I have found code on your site ...
  A: You have two options: only save the best path length, or save all paths. To save the best path ...
Finding Fastest Solution to Maze Using Stack10/19/2009
  Q: Hey, I am having issues finding the fastest solution to a maze. I have found code on your site ...
  A: In order to find the fastest path add to the existing DFS code 3 changes: 1. Count the length of the ...
Random questions10/17/2009
  Q: I was wondering if you could maybe help me, I am working on a project that requires me to create a ...
  A: Juan, This is the actual code. Simply put it in you Class and call it from your "main" method. I ...
how to create questions10/17/2009
  Q: I was wondering if you could maybe help me, I am working on a project that requires me to create a ...
  A: In my answer, the boolean array "chosen" prevents from questions to be picked again - you can call ...
Java runtime10/16/2009
  Q: what is java? what happens if i remove java? java is taken up 90kb.I have low disk space and I ...
  A: Java is a runtime environment to execute Java programs. Java programs are not installed on your ...
Casting, Datatype Double10/15/2009
  Q: i am doind some homework for my Java module and have got stuck on this question. it is as follows. ...
  A: I must admit there are better places to find a complete answer for "casting" question, such as: ...
Java application - login and connect to DB10/14/2009
  Q: Respected Sir, I am given a task to create an Employee Database for an organisation.I ...
  A: First a few sentences about application structure and then some clarification regarding your ...
how to create questions10/13/2009
  Q: I was wondering if you could maybe help me, I am working on a project that requires me to create a ...
  A: I need more details to be able to give a good answer. Two points I can suggest at the moment: (1) ...
Excel in Java9/23/2009
  Q: Sir I am developing one Share Market application in java. So I want to insert the data in Excel ...
  A: Two options: (1) Try to load the driver: final Class<?> driverClass = ...
interactive website9/22/2009
  Q: How are you? Thanks for taking questions. I would like to write a photo webiste where a user could ...
  A: You don't need to learn Java for this. A web-site (and any application) is composed of three ...
How get the color name?9/14/2009
  Q: First I would like to apologize for my mistakes in English. I am in Brazil, I am Brazilian, I speak ...
  A: I suggest you search the web for PixelGrabber: ...
random words9/12/2009
  Q: I have a question on how to write a program can you help me. I have to write a program that will ...
  A: My best advise for a beginner is to use as many methods as possible. You seem to understand the ...
book9/10/2009
  Q: Which is the best book in java?
  A: It depends on you want to achieve from Java. And even then there is no easy answer. I would ...
send email to the client9/9/2009
  Q: sir, i want to do, when any client registered on my site i want to sent email on his mail id.how ...
  A: Sorry for the late response. It's difficult answering this question without knowing the workarounds ...
java classes and set methods9/8/2009
  Q: i'd like to know how to create a sub class with set and get methods. ur help will be appreciated. ...
  A: Set and get of what? Subclass of what? - Sub class simply extends another class. For example: class ...
Running applet9/1/2009
  Q: I'm Angela and I'm currently learning Java using a MacBook. I'm trying to create my first applet, by ...
  A: I tried your HTML code using Firefox. It showed: My Java applet says: [error message] So html code ...
integer condition8/26/2009
  Q: what an if statement that prints the messages "The number is valid" if the variable speed is within ...
  A: Is this what you meant? public void checkSpeed (int speed) { if (speed >= 0 && speed <= 200) { ...
programming8/22/2009
  Q: using the import java.util.Scanner, how can I develop an application that reads product id, product ...
  A: Please read here: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html and here ...
find string or not8/21/2009
  Q: sir , i have three type of string String s1="200908211738049843-89502501500"; String ...
  A: Have a look at this method: public void checkString (String s) { if (s.equals(s1) || ...
Is the String an Integer8/18/2009
  Q: sir, i have one string, String s="12387500027"; but i have to check in my string s ,there is ...
  A: You have two options: (1) try { Integer.parseInt(s) } catch (NumberFormatException e) { // The ...
read XML file8/12/2009
  Q: sir, i have one file "postto.txt" file is text file and inside of dis file this is written "<?xml ...
  A: Your "text" file is an XML file. Here is a code example, you should read more on the web. ...
Develop Communication Server8/4/2009
  Q: My task is to develop program for handle vehicle tracking system. Data packets are coming from ...
  A: I cannot send an example, as it will be too long. I can tell you what you need, and you should look ...
call a function every 10 min8/3/2009
  Q: sir, i m not expert ,i m just begener so plz can u write sime code for ,if i have 2 class CLASS ...
  A: I apologize for the delay in my response. The best method to call to wait time T is ...
java7/31/2009
  Q: Please kindly help me with this problem, I would like to create a program that will ask the user to ...
  A: I am sorry, but is too much of a home-work question, which we are not suppose to answer. I will tell ...
Comparing 2 arrays and adding and deleting from the destination array7/28/2009
  Q: I want to write a Java program that has two arraylist, one named as srcList and the other as ...
  A: I will not give a complete solution. Here is one loop. I trust in your ability to write the other. ...
get my IP7/26/2009
  Q: sir, I like to know the function and the object that I need to use to get my present ip ...
  A: (1) Regrading your IP address: - whatismyip.com gives your WAN IP - the IP as your network connects ...
javascript: Date7/20/2009
  Q: how to find the difference between two days in java script? Now store the difference, in days in an ...
  A: Here you can see some of Javascript date functions: ...
Creating and manipulating Array Of Objects7/19/2009
  Q: Iam unable to visualize the concept of array of objects. Please help me understand the same with an ...
  A: First I will answer your question regarding the type of the array and then we'll continue with the ...
Creating and manipulating Array Of Objects7/16/2009
  Q: Iam unable to visualize the concept of array of objects. Please help me understand the same with an ...
  A: An array of objects is simply a sequence of objects one after the other. Think of a shopping list: ...
how to partially upload my pdf files7/15/2009
  Q: sir ,please tell me how can i upload my pdf file on my server so before fully upload first i can ...
  A: There are two options: (1) You load all the file and than use a program like TrID: ...
How to invoke browser based XML query through java program7/9/2009
  Q: Here is the scenario, which i execute manually. I have a server where java based web application ...
  A: You plan is excellent. I am not sure what do you mean by "send the XML query to the web ...
Jfreechart - compiling7/2/2009
  Q: I need Jfreechart library for my application.I cannot understand its manual.can you please explain ...
  A: To include any library with your compilation, you include it in the classpath. Example: javac -cp ...
jar file dought!!6/23/2009
  Q: sir, this is venkatesh and i am an engineering student.i have a little knowledge of jar file.now i ...
  A: Inside the JAR there is a Manifest file. In that file there is a classpath. I guess that the entry ...
Help Me6/22/2009
  Q: Java Script is better than other scripting languages for web design ???? plz give me anwer in detail ...
  A: JavaScript is very popular, so you can find many examples. It easy to learn and easy to write. But ...
Printing with java6/16/2009
  Q: your answer to my last question about printing was excellent, and it makes a lot of sense to me, but ...
  A: The example you used (the first on the page) is based on: "If your OS and printer supports it, you ...
Print Pattern6/15/2009
  Q: First of all sorry to ask such a dum question i am a dum dum Can you help me write a program to ...
  A: Yes I can help you. This is a rather simple loop. As you can see here: 1234* 123* * 12* * * 1* * * * ...
Java Massanger6/13/2009
  Q: I want to create a messenger in Java I have very small knowledge in Java What skills should i have ...
  A: You need to learn a bit about Socket. Once you have an open socket you can send or receive data on ...
cannot detect the run time error6/12/2009
  Q: the given program reads a file and seperates the string which matches witha given string and then ...
  A: "at b1.main(b1.java:65)" means the error occurred on line 65. Line 64 is: int pos=str.indexOf('.'); ...
java array object6/10/2009
  Q: if you have information like this : cheese burger main meal 11.00 hot wings stater 12.30 ...
  A: My answer is the same. Example: _____FoodArray___SalesArray ------------------------------ ...
java array object6/9/2009
  Q: if you have information like this : cheese burger main meal 11.00 hot wings stater 12.30 ...
  A: If I understand the question correctly, try this: String foodSold = "hot wings"; int i = ...
Java printing6/8/2009
  Q: this might be trivial for you, but belive me I'll appreciate your guidance. I just finished coding a ...
  A: Sorry for the delay. Have you tried this: ...
Java printing6/4/2009
  Q: this might be trivial for you, but belive me I'll appreciate your guidance. I just finished coding a ...
  A: Sorry, I don't understand the"how do I print this?" What do you mean by "print"? Print to the ...
Threads and try/catch6/1/2009
  Q: why we are writing java thread code inside try/catch block? ANSWER: Hi Pratap, Usually, Thread ...
  A: another thread interrupts it using the [interrupt] method in class Thread. See here: ...
Threads and try/catch5/30/2009
  Q: why we are writing java thread code inside try/catch block?
  A: Usually, Thread calls, such as: try { thisThread.sleep(interval); } catch ...
Java Earlier Version Warning Message5/29/2009
  Q: I play some java-based games on my laptop with the most recent version of java... and there are ...
  A: The best solution I know is to remove the older versions of Java from your PC. - Close all the ...
Findind a job in Java, having a SCJP5/23/2009
  Q: i am 21 years old and i only have matric qualification and im currently doing sun certified java ...
  A: The answer depends on where you will look for a job. Some places put a strong emphasis on your ...
Adding images in JAR File5/17/2009
  Q: Ziv Ben I've just completed my project in java. And now i want to make executable JAR ...
  A: Here is a quick solution. After you created the simple JAR, using Eclipse, you can open that JAR ...
chat program5/15/2009
  Q: what code to select contact from list and show private chat for this contact ?
  A: The main question is whether you need a server to connect between clients or client-to-client ...
JNI question!!!!5/14/2009
  Q: I've one problem in getting the value of enum variable in JNI function ,which is residing in one ...
  A: I admit I am not an expert on JNI. As you mentioned: "Probably obj is not fine here" I see that: ___ ...
java queue5/11/2009
  Q: ..but it doesnt seem to be working at all ..could you please help me and see what the problem is? ...
  A: y. Using an array is a good and simple implementation. A better option is a Linked-List. Or, an ...
java constructor5/3/2009
  Q: public Customer (Time24Hour arrival, Time24Hour trans, int custId) { // you fill in arrival = new ...
  A: If I understand what you are trying to do, then this is not a proper constructor. Here is how I see ...
Help me with static variable4/26/2009
  Q: I need help. Ill go straight to the point: I have 3 classes: [QUOTE][B]public class AssembledPart ...
  A: I see you understand that static variables are the same for all instances of the classes, and that ...
java compiler and decompiler4/25/2009
  Q: I'd like to know some more about Java. And that is if I can decompile any professional software ...
  A: Obviously a Java decompiler should be able to decompile any professional Java software - i.e., it ...
clear screen applet4/2/2009
  Q: now... when ever click on clear button then it clear the applet screen and reload and the command ...
  A: Sorry for the delay in my response. I was considering how to clear the command prompt, when I saw ...
allign the string output (printf)4/1/2009
  Q: Could you help me with the following please? I am printing(outputting) from a string linkedList both ...
  A: Here is a starting point: public static void main(String[] args) { String words[] = {"could I ...
Encrypt and Decrypt codes3/31/2009
  Q: I just need to ask a question about encryption and decryption. How could you improve the codes to ...
  A: I am sorry for the delay in my response. I am not an expert in encryption, so I had to check around. ...
allign the string output (printf)3/30/2009
  Q: Could you help me with the following please? I am printing(outputting) from a string linkedList both ...
  A: You should read about Java's sprintf - PrintfFormat. Here is a link: ...
onlin exam3/28/2009
  Q: ..Thanx for the previous help..... Actually my problem is...i need to write the source code in java ...
  A: What you are asking here is not question - you are asking for an application (a small application). ...
Creating a distance conversion menu using a [void function] polymorphisms3/27/2009
  Q: I have to write a program that gives a menu of distance conversions from meters to kilometers, ...
  A: Usually the problem of "void function" is in C\C++, where the function signature is not so ...
increment decrement opertors3/26/2009
  Q: how do increment and decrement operators work in an expression? is it that first all increment then ...
  A: A post increment/decrement happens immediately after the expression is evaluated, and a pre ...
hi3/26/2009
  Q: ..can u give me the source code for online exam application in java.. Thank you ANSWER: Hi Sweety, ...
  A: I must admit I don't see the connection to the original question regarding the online exam. But ...
changing file's hidden property3/24/2009
  Q: how can i access and change "hidden property" and "system property" of a file
  A: To access such file attributes, by Java, you must use either: (1) Win32 API or (2) system calls. ...
comparing 2 text files3/24/2009
  Q: Could you provide me with some examples and codes (links or tutorials)on how to compare 2 text ...
  A: There are many formats for a file (Word, RTF, Text). I will assume you mean a normal text file. (A) ...
HTML (JavaScript) countdown page3/22/2009
  Q: ..can u give me the source code for online exam application in java.. Thank you ANSWER: Hi Sweety, ...
  A: If all you want is a time countdown than here is a nice solution: ...
controls in java3/20/2009
  Q: can you help me with my code. here's the code i made.. import java.applet.*; import java.awt.*; ...
  A: here is a simple answer that should work. (1) Move flavorGroup to be a global variable. (2) /** ...
online exam application3/20/2009
  Q: ..can u give me the source code for online exam application in java.. Thank you
  A: That's quite a question. It sounds as though you need JSP pages or a JavaScript application, unless ...
to print Unicode Assamese character in Java3/19/2009
  Q: it is working now.. but create another proble...... To print word (for example: ...
  A: I am not clear on what isn't working. Writing these characters in your Java editors depends on the ...
Unicode character print3/16/2009
  Q: I want to print some unicode character(of Hindi language) as output. what are the procedure I have ...
  A: I'm afraid the solution is a bit complex, there are some configuration files to be edited. I will ...
Unicode character print3/14/2009
  Q: I want to print some unicode character(of Hindi language) as output. what are the procedure I have ...
  A: You should search the web for "java unicode". Here is a short answer: (1) You should save the Java ...
Change Co-ordinates of Button3/9/2009
  Q: How can we change co-ordinates of button on frame in java? I want to place button at particular ...
  A: I am sorry for the delay in my response. Using JFrame and JButton (swing package) should work with ...
Displaying Arabic Strings3/6/2009
  Q: I'm working on a project and was given some Arabic strings to be used in the program. I am supposed ...
  A: Some text editors add some bytes at the beginning of a text file, when save it in UTF-8 (you can ...
Displaying Arabic Strings3/4/2009
  Q: I'm working on a project and was given some Arabic strings to be used in the program. I am supposed ...
  A: You should indeed save the file in UTF-8 format. Then, to compile it use: javac -encoding UTF-8 ...
Follow up on the last question3/3/2009
  Q: In your answer you mentioned do not take the algorithm word by word but I don't know how else to do ...
  A: You did a good job translating so far. I cannot give you a complete translation, as that is your ...
Need help on part of the code please3/2/2009
  Q: I really am trying to write the code. It has been almost a week that I am working on this and I am ...
  A: Don't take the algorithm word by word. If you are using switch-case you will have some duplicities. ...
Need help on part of the code please3/2/2009
  Q: I really am trying to write the code. It has been almost a week that I am working on this and I am ...
  A: The infix form 8 * 7 * 6 has two prefix forms: * 8 * 7 6 and * * 8 7 6. Option A: * 8 * 7 6 For ...
Need help on part of the code please3/2/2009
  Q: I really am trying to write the code. It has been almost a week that I am working on this and I am ...
  A: I have good news and bad news. The good news are that I will give you an answer. The bad news are ...

All Questions in This Category

Email this page
     
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2006 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.