35,618 Topics

Member Avatar for
Member Avatar for frank85

Need assistance with formatting the output; everything prints out in one line. I want the output to look more like a letter firstname lastname 123 main street miami, oh 90210 Dear firtname lastname, text text text more text more text sincerily, blah > /public class Letter { > > /private …

Member Avatar for JamesCherrill
0
108
Member Avatar for anisha.silva

hi i did not know which category this would go under so posted under java. any idea on what are the timing schemes for process coordination?

0
55
Member Avatar for moussa_90

i have java programming course as an elective course and i have aproject could u help me plz?

Member Avatar for JamesCherrill
0
39
Member Avatar for hyung101

**How am I going to split a line of strings ang put it into an array if the strings are arranged into columns, just like the attached file then compare the first column with user's input..? **

Member Avatar for hyung101
0
415
Member Avatar for Valiantangel

1.Create class IntegerSet. Each IntegerSet object can hold integers in the range 0-100. The set is represented by an array of bools. Array element a[ i ] is true if integer i is in the set. Array element a[ j ] is false if integer j is not in the …

Member Avatar for JamesCherrill
0
854
Member Avatar for hoopd505

I'm making a Riemman sum code for a school project but I keep getting this error at line 37. The line is in the for loop after the statement "String coord2;". String message, message2, numStr, numStr2, numStr3, numStr4, numStr5; double a, n, xmin, xmax, w, w2, w3, w4, w5, area, …

Member Avatar for wen_cai
0
253
Member Avatar for jwings

protected void addBindings() { InputMap inputMap = this.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW); ActionMap actionMap = this.getRootPane().getActionMap(); KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_Z, Event.CTRL_MASK); inputMap.put(key, "undo"); actionMap.put("undo", new UndoAction()); key = KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK); inputMap.put(key, "completed"); actionMap.put("completed", new CompletedAction()); key = KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK); inputMap.put(key, "delete"); actionMap.put("delete", new DeleteAction()); } class UndoAction extends AbstractAction { @Override public void actionPerformed(ActionEvent …

Member Avatar for JamesCherrill
0
99
Member Avatar for shilu2

Hi All, Can you please help me how to create user defined function for database connectivity and return values to anather servlet. I have tried following code but it indicates error can not find symbol package controller; import java.io.IOException; import java.io.PrintWriter; import java.sql.*; import java.util.*; import java.util.ArrayList; import javax.servlet.RequestDispatcher; import …

0
86
Member Avatar for manish250

Hi All, I am not been able to understand "What is application context" even after trying a lot on google.Can anybody make be understand the application context concept and how it is different from servlet context. Thanks

0
122
Member Avatar for enakta13

I have made a keyTyped event java program. Now it display square for each single number i typed through keyborad. **What i want is this:** 1. when i type 1 answer to be displayed 1 2. Again when i type 2 answer to be 144, not 4. So any Idea …

Member Avatar for stultuske
0
180
Member Avatar for godzab

Hello guys, I need help with the Robot class in Java. I am trying to excute a couple of keystrokes using an array so it will be less repetitive typing in the keyPress method. Here is the code: import java.awt.AWTException; import java.awt.Robot; import java.awt.event.KeyEvent; import java.io.IOException; public class RobotExp { …

Member Avatar for godzab
0
975
Member Avatar for james chaco

Hello, I want to develop an email system (preferably through java but any other language will also do), say mymail.com, exactly like gmail, yahoo, hotmail or any other mailing system where users can send and receive a mail. I would like to know where can i start from. Thanks in …

Member Avatar for godzab
0
240
Member Avatar for malsmit2014

I am not totaly sure my code for my revealLetter is correct....I can't quite convert letter string into an char array so i just left it as hiddenWord == letter in the code.... package program.p02; public class WordHider { private String hiddenWord; private String partiallyFoundWord; private int NUMBER_MISSES = 5; …

Member Avatar for stultuske
0
209
Member Avatar for malsmit2014

package program.p02; import java.io.*; import java.util.*; import java.lang.*; public class Dictionary { private String[] dictionary; private static final int NUMBER_OF_WORDS = 81452; private static String FILE_NAME = "dictionarycleaned.txt"; //no arg constructor??? public Dictionary() { Scanner fin = null; //open and test the stream try { fin = new Scanner(new File(FILE_NAME)); …

Member Avatar for JamesCherrill
0
188
Member Avatar for kng9

Hello everyone, Im new to this forum and sort of new to Java aswell. I'd like to ask you to comment on the way I practise Java and also hopefully solve this **"Start: Applet not initialized."** error. I have not tried to run this through browsers because i didn't create …

Member Avatar for kng9
0
159
Member Avatar for nHulk

Below code includes both client and server code.... I am trying to read message from client and display it on server and vice versa......Problem i am facing is both the codes are executin but messages are not getting displayed ....help me import java.io.*; import java.net.*; class Client { public static …

Member Avatar for NormR1
0
293
Member Avatar for SuperManofBC

public String getCurrentDay() { if(day.getValue() == 0) { return "Sunday"; } if(day.getValue() == 1) { return "Monday"; } if(day.getValue() == 2) { return "Tuesday"; } if(day.getValue() == 3) { return "Wednesday"; } if(day.getValue() == 4) { return "Thursday"; } if(day.getValue() == 5) { return "Friday"; } if(day.getValue() == 6) { …

Member Avatar for stultuske
0
215
Member Avatar for jwings

Now I have 2 classes. The first one is called UIController and the other one is called MainJFrame. I would like to know how to make a listener for a JFrame which has a JComboBox inside. Everytime a ComboBox submit a new data the JFrame will tell the UIController that …

Member Avatar for JamesCherrill
0
94
Member Avatar for daravindm

i have adoubt about passing a parameter in JSP page.. could u help anyone please.. i have getiing a value from text box in jsp page 1 -> am using that text box value in jsp page 2 -> now i want to use that same textbox value in jsp …

Member Avatar for moniyak
0
155
Member Avatar for profyou

i have been confused lately regarding where to concentrate... java or c++ or Algorithms & data structures or ........(there are still more languages) whenever i concentrate on java i tend to forget c++ or various algorithms or assembly( i have learned 8086/8088 programming). java is very large...core java......file io....swing..servlets....enterprise java...and …

Member Avatar for jackbauer24
0
287
Member Avatar for Jdan2388

hi i'm having trouble with this rock paper scissors program looping correctly. Ok so first of all that game is a simple rock paper scissors of the user against the cpu. The program begins by asking the user what choice he/she would like from a dropdown menu rock. paper or …

Member Avatar for NormR1
0
192
Member Avatar for JavaPadawan

In this program I'm attempting to visually represent a selection sort using an array of rectangle objects. If the program worked as intended, the rectangles would sort themselves from least to greatest, with two rectangles switching spots and the array being repainted each time through the selection sort loop. As …

Member Avatar for wen_cai
0
229
Member Avatar for rtellez700

Hello I am running into an error after creating the jar file. I get a message stating that the main class to my program could not be found when in fact there is a main class. If someone could give me a hand and lead me in the right direction …

Member Avatar for NormR1
0
1K
Member Avatar for thanatos1

Hey guys, i've been making a little super mario clone in Java but I need help, you see, if you download it and play it, you will notice it is quite stutter-y, and that really shouldn't be the case since it's such a small program. game link : [Click Here](http://www.filefactory.com/file/4mx7jddejnrr/n/super_mario_clone.zip) …

Member Avatar for JamesCherrill
0
721
Member Avatar for anisha.silva

Hi I have a program for DUP client and server in java. when i run the UDPServer and type netstat in the cmd it dosen't show any open port for UDP. why is this? is it because it is a connectionless protocol? appreciate any commnts

Member Avatar for Majestics
0
119
Member Avatar for speakon

Hello, I am working on a project and am in need of search function. How my system works: User enters details Stored into a text file writes a blank line at the end of the record when reading in the file, a new blank line = new record So for …

Member Avatar for speakon
0
387
Member Avatar for newprogrammer12

hi for my programming class we have to write an average calculator program in any langauge we want. I did mine in Java and im fairly new to programming. the problem with my code is how can I improve it to make sure user's incorrect input ruins program. for example …

Member Avatar for jackbauer24
0
220
Member Avatar for riahc3

Hey When I try to interpret thru PHP, a Java web service that returns a boolean type, this error (more like a warning) pops up: Notice: Object of class stdClass could not be converted to int in C:\testing\page.php on line 29 How can I make the PHP page understand true …

Member Avatar for pritaeas
0
399
Member Avatar for wab9jon

Hello I cant figure out how to recive a boolean from a method in another class. public boolean arYatzy() { boolean yatzy = true; for (int i = 0; i < tarn.length - 1; i++) { yatzy = yatzy && (tarn[i] == tarn[i + 1]); } if (yatzy) { return …

Member Avatar for wab9jon
0
212
Member Avatar for anuj_sharma

Hi, I am trying to develop something but I am stuck. it's not about the code but about the implementation. The application captures screenshots and then inserts all the images in a RTF document. Now, the user is also supposed to write a one line description for each image inserted. …

Member Avatar for rtellez700
0
154

The End.