Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

how to find duplicates in a string?
W.A.P with class name volume to find the volumes of 13 shapes the program must be menu driven in cooperating all the different functions(return,without return with arguments etc.)Java prgram
program that displays a random uppercase letter using Math.random() method. Your program will promt user if the program will continue or not using JOptionPane.showConfirm() method. A random uppercase letter will be displayed if user wants to continue. Document your program as discussed and required in the class.
You have a block of platinum that can be exchanged in your bank either for cash
or for smaller blocks of platinum. If you exchange a block of m grams, you get
three blocks of weight m/2, m/3 and m/4 grams each. You don't get any fractional
part, as the division process rounds down the value. If you exchange the block of
platinum for cash, you get m units of currency. You can do any number of
exchanges for smaller blocks or currency.
Given the value of a block in grams as input, write a program that would print the
largest possible currency value that you can receive as the output. Assume that
the maximum value of a block that can be given as an input is 1,000,000,000
grams and the minimum value is 2 grams.
Sample input 1
12
Sample output 1
13
Explanation: You can change 12 into blocks of 12/2 = 6, 12/3 = 4 and 12/4 = 3,
and then exchange these for 6 + 4 + 3 = 13 units of currency
13
Sample input 2 2
Sample output 2 2
Explanation: If you exchange 2 grams into smaller blocks, it gives 2/2 =
Q) Write an interactive Java program that adds two integers of up to 50 digits each (Represents integer as an array of digits).
The import javax.servlet cannot be resolved in jsp ? how to clear this error?
how to add addUndoableEditListener to a jTable rows
I worked undo/redo function on a jTextField using code below. I tried to add UndoableEditListener to jTable but I got nothing.When you add a row to the table with wrong details then you should be able to erase that row using Control + Z as well as you press Control + Y the same row should be visible in the jTable with early mentioned values also. I think it's not implementing a CellEditor. Please help me on this.
final UndoManager undo = new UndoManager();
JTextField jTextField1 = new JTextField();
Document doc = jTextField1.getDocument();
doc.addUndoableEditListener(new UndoableEditListener() {

public void undoableEditHappened(UndoableEditEvent evt) {
undo.addEdit(evt.getEdit());
}
});
jTextField1.getActionMap().put("undo", new AbstractAction("undo") {

public void actionPerformed(ActionEvent arg0) {
try {
if (undo.canUndo()) {
So how does JavaScript differ from other compiled languages like C++ and Visual Basic. Also, what are some ways JavaScript can be used to enhance the Web user experience???
Hello ,
I am a biginner programming and this is my first project in java.
The project is to develop the game Translate the Word .... It is asking user to translate a word proposed to and check if the input response is correct. At the end of the game score will be calculated and displayed.
Game Progress :
1 - Ask the user to specify , through the console , its name and the number of words to offer . It is up to you to handle exceptions (eg number of words greater than the number you provided ) 2 - Retrieve the user response ( the word translated ) and check whether to continue . (eg you want to continue (y / n)) after each proposal. 3 - compare the response of the user with that which is preset for the word in question . 4 - Show the score at the end ( or at the breakpoint ) . 5 - Save the file in a user name , the score , the number of questions and the start date and end of the game played .
Some notes to consider :
1 - The language (eg, English - French , English - Arabic , etc. . ): It is up to you to specify the language adopted in the game and inform the user of your choice.
2 - The word bank to offer : It is up to you to develop the appropriate means to get the words to propose to the user. That said , the words and their translations can be recovered :
a TXT file
b . an XML file . ( Tutorials DOM and SAX )
c . CSV file ( Tutorial OpenCSV ) d. a database ( Tutorial Access) e . through APIs (eg Wordnet and google translate etc . ) .
f . a combination of the previous options a, bc , d and / or e . (eg words stored in a txt file and answers retrieved from the google translate api ) g. etc. .
You will need to add one or more external libraries to your project. here for details on adding external libraries to Netbeans .
3 - A user will be associated with the question score if he can translate the word correctly. The score for each question can be calculated based on the number of words / questions to be proposed .
Development:
In this project you will need at least :
• Question class to encapsulate the word and its translations and provide all necessary methods to manipulate the object type Question.
• IParser an extensible interface to make the project. Any class that implements IParser is a parser file (XML , TXT , CSV , etc.). / Database. In your project there will be a single class that implements IParser and will be used to retrieve words and their translations
Bonus
Add the ability to store the questions and answers of the user on the hard disk. Make the class Serializable Question.

I got the words and their translations from a Micrososft Access Database and I did the connection between Netbeans and Ms access ,it has succesfully worked.I started working on my project.Do you mind if I show you my whole work till now
Would you please give me a hand?
Thank you
Write a program to manage an hash table, using open addressing, with numeric long integer keys, where the hash function should be selectable before each run. The methods you should use in building your has functions are linear, quadratic and double hashing. Your code should provide create, insert, find and delete operations on that table. .
LATEST TUTORIALS
APPROVED BY CLIENTS