35,618 Topics
![]() | |
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 | |
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 … | |
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! | |
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 … | |
str1=new String(data,0,data.Length()) why the zero is used in the string function please explain me the what this line says??? | |
can anyone send me a link for, free video tutorials for java web component development with netbeans. ![]() | |
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 … | |
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 … | |
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; … | |
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 … | |
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 … | |
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 … | |
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. */ … | |
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 … | |
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 … | |
i am tring to debug this problem for about a week but had no luck in it.  Take a look at this image above. This is how i want the bullets to look like. shoot red lines.  Now take a look at this image above. I … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 " … | |
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 … | |
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; … | |
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. // … | |
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? | |
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 … | |
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 … | |
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 … |
The End.