| Subject | Date Asked | Expert |
|
| Max integer value | 11/20/2009 | Artemus Harper |
Q: I need to know how to do dynamic program on collatz conjecture. i.e for x = 1 to maxofinteger ... A: You can use long (instead of int), which has twice as many bits and a much bigger value (big enough ...
|
| Java Fundementals Book program 5-4 | 11/19/2009 | Artemus Harper |
Q: hey the porgram problem i have is this, my AP CS teacher aasked us to try and write a program like ... A: You need a class Dice. That class has a single field current, it should be private. Add a method to ...
|
| Displaying Bitmaps | 11/19/2009 | Artemus Harper |
Q: I just ran into this previous answer you gave: http://en.allexperts.com/q/Java-1046/java-swing-2.htm ... A: Its pretty easy to implement your own zoom. You can simply: float scale = ...; Point scaleCenter = ...
|
| SCJP | 11/18/2009 | Artemus Harper |
Q: This program will not compile. Cannot find symbol: variable passengers. /* A program that uses the ... A: You have: class Vehicle2 { int passengers; // number of passengers int fuelcap; // fuel ...
|
| Java Palindrome No. | 11/18/2009 | Artemus Harper |
Q: please assist me in making a java prog. for checking a palindrome no......and please tell me if the ... A: To 'peel' off a digit from a number you can: int num = ...; int remaining = num; while(remaining != ...
|
| SCJP | 11/17/2009 | Artemus Harper |
Q: This program will not compile. Cannot find symbol: variable passengers. /* A program that uses the ... A: You are creating a new instance of Vehicle, not Vehicle2 as you have declared above. The compiler is ...
|
| java or C++ security comparison | 11/17/2009 | Artemus Harper |
Q: I want ot know when it comes to security, that is securing your applications and softwares and ... A: Java will be a better choice as one of the primary focuses of Java is security. Most exploits in ...
|
| java performance and full control of the hardware | 11/17/2009 | Ziv Ben-Eliahu |
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 ...
|
| Java Programming | 11/17/2009 | Artemus Harper |
Q: Well I have question than I am curious about. I want to know if it is possible to write a method ... A: To determine if a number is a power of 2 you can use the trick: if((n & -n) == n) { //power of 2 ...
|
| Java DesktopPane | 11/15/2009 | Artemus Harper |
Q: Sir i m develping desktop application in netbean. first problem is that of ApplicationView ... A: 1. I'm not sure what the ApplicationView class is. It is not a class in the standard Java API, so I ...
|
| dictionary in java | 11/14/2009 | Neal Ziring |
Q: i want to make a dictionary in java.can you give me a code? A: Shovon, > > i want to make a dictionary in java.can you give me a code? > I'm sorry, but your ...
|
| Counting sub-sets | 11/14/2009 | Ziv Ben-Eliahu |
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 ...
|
| Easy Counting Program? | 11/14/2009 | Neal Ziring |
Q: Can you please tell me how to write the following program? I would greatly appreciate it! I dont ... A: Ryan, This is not a trivial program to write, especially if you want to be reasonably efficient ...
|
| Easy Counting Program? | 11/14/2009 | Artemus Harper |
Q: I need some hints on how to proceed to write the program, specifically on how to set up the ... A: The first thing you should notice is that if some set is not valid, than all super sets of that set ...
|
| java | 11/12/2009 | Neal Ziring |
Q: sir, Tell me how to save the output in textpad. for example, for(int i=0;i<9;i++) { ... A: Sri, > sir, > Tell me how to save the output in notepad. for example, > for(int i=0;i<9;i++) > ...
|
| Output to file | 11/12/2009 | Ziv Ben-Eliahu |
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 ...
|
| j2ee | 11/12/2009 | Neal Ziring |
Q: I wrote dis program…its working fine but i want to store encrypted data in seperate .txt file and ... A: Sujatha, > i stored encrypted data in one file and i am decrypting dat file but it > giving error ...
|
| calling an array from constructor | 11/10/2009 | Ziv Ben-Eliahu |
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? ...
|
| Logic circuit | 11/8/2009 | Artemus Harper |
Q: Sir, plz am jus a beginer in java, i want to write a program using swing gui to build logic circuits ... A: This problem is best solved by simply doing your own drawing. Nothing in swing will help you much ...
|
| Swing, Logic-circuit | 11/8/2009 | Ziv Ben-Eliahu |
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 ...
|
| Compare two .CSV | 11/7/2009 | Artemus Harper |
Q: I Want to compare two .csv file and check..if the entries are equal Well not exactly.equal..with 3% ... A: This is pretty simple: First create a Reader to read text in: BufferedReader reader1 = new ...
|
| javac | 11/6/2009 | Artemus Harper |
Q: Im currently teaching myself java from different tutorils on the internet. verytime I try compiling ... A: when you install the Java SDK it does not add the compiler to the PATH, only things on the PATH and ...
|
| Classpath usage | 11/6/2009 | Ziv Ben-Eliahu |
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 ...
|
| deadly diamond of death pblm | 11/3/2009 | Beenish |
Q: I am learning java nw.I saw that java doesn't allow multiple inheritance because of this pblm. As a ... A: Well, first you should completely understand what is the deadly diamond of death. Lets say, if Java ...
|
| Big O Notation problem | 11/2/2009 | Artemus Harper |
Q: I wanted to evaluate an algorithm and my adviser told me to use the Big O notation. I really don't ... A: Your processor can probably help you better than I can. The Big O of an algorithm is a calculation ...
|
| Class usage | 11/2/2009 | Ziv Ben-Eliahu |
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 ...
|
| Packet sniffing | 10/31/2009 | Neal Ziring |
Q: I was testing my home network and I used a packet sniffer to capture packets on my network, but the ... A: Tony, It depends on what protocol was used for the encryption. I'm afraid you haven't given me ...
|
| Stop Words | 10/31/2009 | Ziv Ben-Eliahu |
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 ...
|
| which language to use for developing apps | 10/31/2009 | Artemus Harper |
Q: I've a strong attitude towards programming, software engineering. I want to develop some cool apps ... A: I use Java since it runs pretty fast without having many of the pitfalls of c++. The language you ...
|
| maze problem | 10/30/2009 | Neal Ziring |
Q: I have read your instructions about finding the all paths in the maze at ... A: John, Actually, the link you gave was a response by Ziv Ben-Eliahu talking about how to extend my ...
|
| calling c++ namespaces and objects from java | 10/30/2009 | Neal Ziring |
Q: i need lot of help in JNI with c++.i have a source code for which i will have to make .so file and ... A: Sitaram, Okay, I understand what you are trying to do. Using JNI is not very hard, but it ...
|
| j2ee | 10/30/2009 | Beenish |
Q: I hv to do encrypt and decrypt the java file from servlet using RSA algorithm....Plz give me any ... A: RSA is basically a algorithm use to encrypt and decrypt your data. Java 1.5 provides with RSA ...
|
| JLabel in JTable | 10/30/2009 | Artemus Harper |
Q: Harper I m Nirav Raval Frm India. At now i m develop one Windowbased Application in java ... A: Set the default renderer (for the Object class) in your JTable (using setDefaultRenderer) to a ...
|
| j2ee | 10/29/2009 | Beenish |
Q: Please i need source code for java api information from java program Thanks in advance.... ANSWER: ... A: Well Sujatha, It is called generating API documentation of your java program. Well, any good id ...
|
| Learning Java | 10/28/2009 | Beenish |
Q: I know nothing about Java, but have seen many job opportunities for people who know Java and have a ... A: Well you are right, Java is the language of choice for the market because of its platform ...
|
| Array assignment | 10/28/2009 | Artemus Harper |
Q: i am in a beginning level Programming class and we were assigned to basically, from my ... A: The array classes don't have any special implementation of toString(), you can use: ...
|
| socket programming | 10/28/2009 | Artemus Harper |
Q: I ran simple example of socket programming in Java that caught it from www.sun.com (KnockKnockServer ... A: You can either debug the application in an IDE (such as eclipse or netbeans) and hit the suspend ...
|
| Exception handing | 10/28/2009 | Artemus Harper |
Q: i've to know what is the difference between PrintStackTrace and Exception and getMessage in ... A: printStackTrace method prints the message and the stack of the current thread when the exception was ...
|
| j2ee | 10/26/2009 | Neal Ziring |
Q: Please I need a a code of how to encrypt and decrypt files in Java with RSA algorithm. Thanks in ... A: Sujatha, There are several good examples available out on the web, and I'll list some for you ...
|
| face recognition using java | 10/25/2009 | Beenish |
Q: We have chosen face recognition as our 3rd year project.Still we are learning about the algorithm ... A: Well, it's a third year project and if i remember, i even did my final project in image processing ...
|