32,199 Topics
| |
I am trying to send a SMS from my Java web application using the API provided on this site. I am not able to receive the response code as its mentioned on its tutorial, which can be found here. I am using the Java version of the code for my … | |
We have a java application running on Centos 6.4 what we notice is that the RES is around 370m which is more then the allocated max that is 256m. Does this signify that we the application is leaking? But overall the jstat gcutil does not show any FGC but quite … | |
Hello all, I would like to first state that it this is a question for a homework assignment, so I'm not looking for exact code but rather just help on something that is frustrating me. We have to create our own ADTs for this assignment and not use built in … | |
Hey Everyone, I want to instantiate an ArrayList in java. I realize the method to doing this is: ArrayList<String> determiners = new ArrayList <String>(); determiners.add("A"); Where "A" is added to the arraylist once created. However, the problem I'm having is that the .add method doesn't work unless in a main … | |
**I have some errors in my code and can't figure out how to get rid of them any help is wonderful.** The full code is: import java.util.Scanner; public class FindGeneSequence2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Please enter a genome for segmentaion into genes: … | |
import java.util.Scanner; import java.util.Random; public class HangmanGame2 { public static void main(String[] args) { Scanner input = new Scanner(System.in); final String[] WordList = { "porcupine", "flamingo", "sasquatch", "poseidon", "minnie mouse", "mickey mouse", "galileo" }; String ChosenWord = WordList[(int)Math.random()*WordList.length]; StringBuffer display = new StringBuffer(ChosenWord.length()); for (int i = 0; i < … | |
I've had enough. I just don't get what's wrong at all. I coded a basic calculator program, and it compiled correctly, no exceptions thingy, sooo... it's probably my mistake --- nothing appears on the calculator's GUI. It's a blank window with just the title. And when executing programs like this, … | |
>what do i need to change if i want this program to convert decimal to hexadecimal thanks. package dectooctal; import java.util.Scanner; public class Dectooctal { public static void main(String[] args) { Scanner input = new Scanner(System.in); int broj; System.out.print("ENTER NUMBER THAT YOU WANT TO CONVERT TO OCTAL: "); broj = … | |
Hi friends, I am using java applet that will perform some operations. Now it is independent of jsp or html page. So,if i close an applet my html page remains active and Vice-Versa. What i want to do is embed an java Applet in html page itself. When i click … | |
hi everyone I'm supposed to write a wifi analyzer in java , what are the libraries I need to do it ? also I'm using linux will my work be protable for windows?? | |
I'm working on a web application for a class of mine. The assignment is to create a College Services app where students can login and register for classes. Right now I'm working on the login portion and it coded out but I'm having some issue and hopeing I get a … | |
i have a for loop and inside i have some code. i want to run this code random. i was thinking of using a if statment. for(int i = 0; i < 50; i++) { if(ran.nextInt(50) > 50/2){ //code } } but i want it so its even more random. … | |
I have the following code on threads.I have a doubt that is it possible that any of the two threads created ie one and two will execute the 2nd print statement in run method before the first print statement in it?That is print hello first and then the current thread … | |
I found some reading materials about factory design pattern (parallel hierarchy) whereby a class in a hierarchy has a corresponding class in the another hierarchy. So I wrote the code as below: package com.factory3; public abstract class Subject { abstract SubjectPlanner createPlanner(); } package com.factory3; public class English extends Subject{ … | |
i have enemy class. and i am createing bunch of them and storing them in arraylist. i am printing them in random places. for(...){ enemy_class = new Enemy((WINDOW_WIDTH/2)+r.nextInt(WINDOW_WIDTH/2), r.nextInt(WINDOW_HEIGHT)); //add in arraylist } the problem is that some times they get create on top of each other. so my plan … | |
Hey Guys, i was looking at the post linked below and been trying to solve the issue, however, i have been unable to solve it. [Click Here](http://www.daniweb.com/software-development/java/threads/384109/data-from-text-file-into-jtable) The post says i "MUST create a new Vector for each row" in order for it to work. as mentioned above, i have … | |
Sorry guys, im beginner in java. Can you help me with these problems. :/ Problems: 1. a. Create an abstract class named Book. Include a String field for the book’s title and a double field for the book’s price. Within the class, include a constructor that requires the price. Include … | |
Hello. I have to design 2 classes that use a binary search tree for storing some orders for some products. I've researched on the Internet about BST implementations in Java, and I've found TreeSet. Do you have any other suggestions? Thank you:) | |
i need some help with binary trees. i belive i have finish with insert and displaying the tree methods. but i can not be sure but i am getting a error in main. error in main: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Cannot make a static reference to … | |
I'm looking to make a single method that takes in my object and spits out a checkbox with an item listener. Here's my relevant portion, the IDE wants me to make my argument and checkbox final prevents the listener from functioning during runtime. Any ideas or help would be appreciated, … | |
Hi.. I want to read data from the microsoft access file(.mdb) using my servlet application . I need to read the data in .mdb file and format it to display on the web using my servlet application (or JSP)..How can i read data from .mdb file? I have never worked … | |
Situation: A pet shop contains multiple pets, namely two cats (Fred, Tom), two dogs (Buch, Bravo) and one bird (Tweety). Each pet has a distinct price, a name, and a sound. In Addition, a pet owner can enter the shop and buy one or multiple pets. On entering the shop … | |
Hi all. I'm trying to create a server/client program in java for an assignment. I'm struggling to get the receiver thread working, which I want to do before I implement the more complex features, but I keep tripping up with the receiver. The sender will send the message, the server … | |
4. Write a program that reads a series of integers until the user enters 3 successive negative ones or 4 successive positive ones (Zeros should be ignored and skipped as they have no effects at all). The program then should display the number of changes (from positive to negative and … | |
i have no insert method and still its adding node in linkedlist. code below have no error so you can run to see the problem better. if u run this it will ask u to enter a command. i only have two commands exit and display. display command will print … | |
Hi everyone I am having trouble finding the nth node of a binary search tree in an inorder traversal. I am getting NullPointerExceptions for any numbers other than 2 and 3 and even those print out the wrong values. If anyone could help it would be greatly appreciated. The method … | |
package battleship; public class BattleShip { public static void main(String[] args) { Addons a = new Addons(); Board b = new Board(); Computer c = new Computer(); Human h = new Human(); LinkedList list = new LinkedList(); while(a.intro()) { a.sleep(1); a.countDown(5); b.prepareBoard(); do { h.play(b.getBoard()); a.checkWinner(b.getBoard()); System.out.println("How the Board stands."); … | |
hi!guys i am very glade to told you that you guys must learn java programing language because i think aproximate one billion devices are running java...so first of all i recommeded you that you guys get the "The complete Java reference book 2"it is the best book for you guys … | |
public class HelloWorld{ static int a; public static void main(String []args){ System.out.println("Hello World"); HelloWorld h =new HelloWorld(); a = h.foo(); System.out.println(a); } int foo() { try{ throw new Exception(); } catch(Exception e){ System.out.println("catch"); return 9; } finally{System.out.println(a);return 10;} } } When I ran the above code output was: Hello World … |
The End.