35,618 Topics

Member Avatar for
Member Avatar for bhallarahul

hello I have a xml like this: <book> <Publication> myPublication0</Publication> <Publication> myPublication<bookName> my book</bookName></Publication> <Publication> myPublication1</Publication> <Publication> myPublication2<bookName> my book2</bookName>asd</Publication> </book> and i want to read through java program and want output like myPublication0 myPublication<bookName> my book</bookName> myPublication1 myPublication2<bookName> my book2</bookName>asd please tell how to get given output

Member Avatar for stultuske
0
180
Member Avatar for joseph.lyons.754

Hey Guys, So I was doin a tutorial and I incorporated it into my code and it works for the most part. The program gives you a list of town names you pick one and hit search. All good so far then the program goes into the database and pulls …

Member Avatar for joseph.lyons.754
0
283
Member Avatar for yyzdslr

I need help with 2d arrays i've posted the problem here [Click Here](http://www.java-forums.org/new-java/71879-please-help-me-im-almost-there.html) (i've posted the problem on java-forums as well) Could someone please tell me what i'm doing wrong or how i could fix this? Thanks!

Member Avatar for JamesCherrill
0
310
Member Avatar for fatalaccidents

Hello all, I'm having trouble writing a spell checker as my recursive function isn't returning what I would like it to. It is meant to chop off the ends of words likes "baker" to bake and check against a predined dictionary. I used recursion for words like "baker's". I have …

Member Avatar for bguild
0
179
Member Avatar for skbluecollars

str1=new String(data,0,data.Length()) why the zero is used in the string function please explain me the what this line says???

Member Avatar for JamesCherrill
0
125
Member Avatar for yavindu

can anyone send me a link for, free video tutorials for java web component development with netbeans.

Member Avatar for LastMitch
0
59
Member Avatar for game06

in enemy bullet class i am creating two different kind of bullets. 'animationFire' and animationFire2. Enemy Bullet class public void paint(Graphics g) { g.drawImage(animationFire.getSprite(), (int)(x),(int)(y), width, height, null); g.drawImage(animationFire2.getSprite(), (int)(x),(int)(y-30), width, height, null); g.drawImage(animationFire2.getSprite(), (int)(x),(int)(y+35), width, height, null); } In Enemy Class i am shooting the bullets. i am doing …

Member Avatar for game06
0
141
Member Avatar for adrian9989

I am trying to write a server-client application for file transfer: the client written in Java and the server written in C++. Unfortunately I have the following error: "java.net.SocketException: Connection reset by peer: socket write error". Here is my code for client: import java.io.*; import java.net.Socket; public class Proba_binar public …

Member Avatar for ktsangop
0
2K
Member Avatar for jalpesh_007

i have made one program,but it will give none of the port number. Following files i have made **SimpleRead.java** import java.io.*; import java.util.*; import javax.comm.*; import java.nio.ByteBuffer; public class SimpleRead extends SpeedometerExample implements Runnable, SerialPortEventListener { static CommPortIdentifier portId; static Enumeration portList; byte[] readBuffer=null; InputStream inputStream; SerialPort serialPort; Thread readThread; …

Member Avatar for JamesCherrill
0
337
Member Avatar for kay19

Well I need help on moifying my report regarding SearchTree.java(Working with Recursion) "Modify the private report to have an additional parameter which indicates the level of indentation at which the visit should be displayed. The public version of report should be modified to call the private version with an indentation …

Member Avatar for riahc3
0
175
Member Avatar for SylvanSagacious

I have a UDP server and need to perform an "all" function. That means when a user sends "all blah blah" the server checks a list of clients and sends "blah blah" to all of them. I've stored the clients in a HashMap and I'm trying to figure a way …

Member Avatar for SylvanSagacious
0
396
Member Avatar for dlgmu537

I have written a super class called Parent.java and it was extended to create a subclass called Child.java. The super class can be compiled properly, but when the child is compiled an error is poped up. //parent class package abc; public class Parent{ protected int st_marks=180; } //child class package …

Member Avatar for jalpesh_007
0
194
Member Avatar for HankReardon

Hello Friends, Can someone please advise me on how to print an array inside of a GUI text field? Thank you, Jim Here is some of my code. /** This private inorder method recursively traverses a binary tree in inorder. @param btree The root of the tree to traverse. */ …

Member Avatar for jalpesh_007
0
2K
Member Avatar for Red_Rain

Hey guys, Writing a project for school and having a little trouble. We are creating a social media program and the teacher never taught us to use databases so we have to store all the data in text files. One of the requirements is to for the users to be …

Member Avatar for mKorbel
0
255
Member Avatar for zebusman

Hi Friends I have just started learning Java.I am getting a problem may be a small one but i coundn't able to figure it out.so here is my Servlet code iam trying to insert data into database after submitting form iam getting **java.lang.NumberFormatException: For input string: ""** I want to …

Member Avatar for zebusman
0
377
Member Avatar for game06

i am tring to debug this problem for about a week but had no luck in it. ![522461a63915f3683bcd1e3e8f00d81d](/attachments/large/4/522461a63915f3683bcd1e3e8f00d81d.gif "522461a63915f3683bcd1e3e8f00d81d") Take a look at this image above. This is how i want the bullets to look like. shoot red lines. ![da7b3eb64b1486e6fec4b7c680889fe7](/attachments/large/4/da7b3eb64b1486e6fec4b7c680889fe7.gif "da7b3eb64b1486e6fec4b7c680889fe7") Now take a look at this image above. I …

Member Avatar for JamesCherrill
0
206
Member Avatar for mferarri

i got this problem from: http://codingbat.com/prob/p178318 This is the question: > Given a string, return the count of the number of times that a substring length 2 appears in the string and also as the last 2 chars of the string, so "hixxxhi" yields 1 (we won't count the end …

Member Avatar for mferarri
0
239
Member Avatar for jalpesh_007

i am new to spring framework. i have learned basic concept of Spring.Now i am trying to simply run one hello world application using spring. i am getting following error.i dont know why? i am using netbeans 7.2 and spring framework 3.1.1 Release. **hello.java** public class hello { private String …

Member Avatar for jalpesh_007
0
1K
Member Avatar for Lynick

Okay so basically my problem is that I have to prompt the user for a set of floating point values once . If they do not enter the right data type then I have to prompt them again. If they dont enter the right type the second time I quit …

Member Avatar for Lynick
0
356
Member Avatar for nova4005

Hello everyone I just finished my last program for class this semester and would love to have some feedback from the memebers here on things that I still need to improve on or good coding practices that I may not know about that can help me become better. I have …

Member Avatar for nova4005
1
468
Member Avatar for Kosamov

Hi Everyone, I've been working on creating this code for a project I've been working on but I can't seem to get it to work. I'm creating a service class that I can then pass to a client class that will read a list of cities that ends in a …

Member Avatar for abhi_d_one
0
175
Member Avatar for hitro456

Hi all, I have some data in the file, which I want to store in the following format : 23 345 9.8 25 457 9.0 11 237 8.3 86 32 2.3 and so on..... I want to store this data in in some data structure, and later I want to …

Member Avatar for JamesCherrill
0
182
Member Avatar for milkman93

Hey everyone, I want to add action listeners to JButtons that were created dynamically by an ArrayList. Here is the code for the button creation. numOfCourse = 6; courseBtnArray.add(new JButton("Course 1")); gbc.gridx = 2; for (int i = 0; i < numOfCourses; i++) { gbc.gridy++; add(courseBtnArray.get(i), gbc); courseBtnArray.add(new JButton("Course " …

Member Avatar for mKorbel
0
486
Member Avatar for bhallarahul

Hi Everyone I need some Assistance, what i am actually doing i read text from pdf and write it on word file(.docx) which is perfectly working but problem is that content of next page is merge with the content of previous page. Now what i want is that when it …

-1
71
Member Avatar for ceelos1974

Hi I got some trouble with my program and I need help. this is the code: public void actionPerformed(ActionEvent arg0) { Object source = arg0.getSource(); if (source == Button1) { System.out.println("Player has choosen the button: " + "button1"); String EP = JOptionPane.showInputDialog("Please enter your file location"); String Path = EP; …

Member Avatar for JamesCherrill
0
169
Member Avatar for toldav

If any one can help me please to answer this questions please: 1. What is the difference between this.dollars and otherMoney.getDollars() 2.- What the return statement of this method is returning. 3.- How this method would be called from the main and give an example Thank you in advanced. // …

Member Avatar for toldav
0
127
Member Avatar for overwraith

If there is a String Buffer, and a String Builder based on array technology, why then is there no equivalent mutable data type based on a Linked List? Or is there?

Member Avatar for overwraith
0
261
Member Avatar for game06

note player is a space ship. in player class i have set up collision so that player cant go above window and below. player class public void playerWCollision() { if(y < 0) { y = 0; } else if(y+height > Main.WINDOW_HEIGHT) { y = Main.WINDOW_HEIGHT-height; } } lets say player …

Member Avatar for game06
0
137
Member Avatar for riahc3

Hello I have this: String price="10,00 €"; int num=2; int sum=Integer.valueOf(price)*num; System.out.println(sum); //Should print out AT LEAST 20,00 But note: That € sign can be $, €, £ or another AND it can come before or after the numeric float amount. What is the best way to do this? Thank …

Member Avatar for mKorbel
0
552
Member Avatar for dlgmu537

Hello Everyone I tried to open a .class file with word format and now all my class files have that Microsoft word icon on it. But I want to remove it and take my .class files to previous style (ie plane style with no icons on it). Is this possible …

Member Avatar for dlgmu537
0
48

The End.