32,204 Topics
| |
hey all im a relative noob with progaming if i could get some help i would be greatfull this is homework but not the whole assignment thank you all So when i run this it works fine if i type in the name of the first node but none of … | |
Hi, I am trying to create a method to check if a binary tree is an AVL tree without using the height method of the author's binary tree. This is my code USING the height: [code] public boolean isAVL(BinaryNode<AnyType> t) { int leftSubtreeHeight; int rightSubtreeHeight; if (t == null) return … | |
i can understand it when we want to implement polymorphism in c++ we use virtual functions and function overriding but when we want to implement polymorphism in java then we do not use virtual methods why. in java we use simply reference object that can store the address and use … | |
I made the famous game Scissors, Paper, Rock as console application. The game runs great ... Now I want to make it a bit more advanced and allow 2 clients/users to play against each other from different locations. I checked few tutorials on sockets and networking, and in them they … | |
There is series of 20 numbers composed by two numbers is given like 9876,7698,7676,9898,987698,769876 Develop a logic in java to find out these two numbers series composed by First number is - 98 Second is-76 How to develop a logic Another series - 1213,121312,1313,1212,12131213 First Number-12 Second Number-13 | |
I am honestly stumped. I need to Create a BankAccount class that has the following: a) Instance variables for: name, accountNumber, balance, typeOfAccount b) Accessor/mutator method for each instance variable (You will end up having 8 methods) c) Create a displayAccountInfo() method that displays the account information as follows: Account … | |
Hi, I am consuming a java WebService through WSDL in asp.net project. I have created a proxy through Visual Studio wsdl utility and added all message header that has value like version, username, password. I am able to run this service through SOAP UI 4.5 but not able to get … | |
It is commanly said that java is architectural neutral what is the basic concept of this.I want brief answer on it and some examples of this. | |
Can someone help me with implementing the deathbycaptcha API into Denodo? Thanks | |
I am trying to create a runnable jar file .. did a few days ago with a single class and worked fine but now it doesn't seem to be working as good with multiple files .. Here is what I did 1) - create manifest.txt the contense of it is … | |
Hey guys! I'm writing this really long code for practice. Got really rusty with Java so I gotta get brain working again. Anyway, the first part of the code asks the user for the number of employees; the for loop then keeps asking the user to input employee names depending … | |
Hi Dw I'm not a master in java and I'm kinder new to it even though I can do certain things in java. I'm developing an object oriented project and I've done with the object class now I want to make the device be able to listen and execute the … | |
I was trying to develop the system so I am stuck, how to insert the image | |
It's not really a problem that I am facing, more like looking for explanation ... I had this import java.util.*; import java.io.*; public class ReadFile { private static int lines=0; private static List<String> words=new ArrayList<String>(); private static String fullLine; private static int indexOfSpace; private static String getWord; private static String … | |
I have two classes that I am compiling from command line. One is Vehicle class, class Vehicle{ int passangers; int fuelcap; int mpg; } and another is VehicleDemo class. This class instantiate an object of Vehicle class. class VehicleDemo{ public static void main(String args[]){ Vehicle minivan = new Vehicle(); int … | |
I am trying to figure out why this one part of my program is not working. I am trying to count the number of the letter s a user types in when prompted using indexOf. For some reason it will not work correctly. Thanks for any help. import java.util.Scanner; public … | |
import java.util.*; public class JavaApplication23{ /** * @param args the command line arguments */ static Scanner console = new Scanner(System.in); public static void main(String[] args) { //creat 5 arrays and declare String [] Student= new String [10]; int [] Quiz1 = new int [10]; int [] Quiz2 = new int … | |
Hello im trying to connect database with my java program for register/login but im not doing well, i have online database on godaddy and i cannot connect with the java program i tryed with using the `URLEncoder` and it works for registering but for loging in i cannot make it … | |
hi i can't undestanding this why the main function in java is static and static function can call using class name. And why we declare main function as public. i can not understanding this procedure of main function in java. plz help me. | |
A few days ago, i made a hangman game and I really want to complete it in any aspect. One of my ideas now is to "import" words from a file. Currently what I have is an Array of Strings (just a few words inside for testing) and what I … | |
Tried to run ServiceServerImpl.class with rmic and got this error. Below is the command prompt text pasting. "C:\Program Files\Java\jdk1.7.0_21\bin>rmic.exe ServiceServerImpl error: File .\ServiceServerImpl.class does not contain type ServiceServerImpl as expected, but type serviceserver.ServiceServerImpl. Please remove the file, or make sure it appears in the correct subdirectory of the class path. … | |
# What I am using: # I am using java & libgdx to create a game in desktop & android. # Error: # Could not find class 'com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator', referenced from method com.aa.GameStates.MainMenu.init so on desktop version, everthing work fine and no errors. Problem is when I run it on android. … | |
please tell me in how many ways OBJECT ORIENTED PROGRAMMING is different from procedural programming in JAVA | |
Hey guys! So I'm writing a program that takes in a user input (1-3) and then executes the corresponding method. I keep getting the wrong output. For example, for prob1 when I input "john doe" it prints "Unauthorized!". And I'm like, foolish computer! I am your MASTER! How can I … | |
Hey guys! So I'm writing a code that takes 10 numbers from the user which is stored in a array. The user then inputs the problem number (1 or 2) depending on what they want to do to the array. Unfortunately, I'm getting and error on line `array[i].prob1(); `.. Here's … | |
Hi, I jus want to ask why is it that the pacman will move but it will get larger when it is painted..also is that the proper way to draw?. here is the code import javax.swing.*; import java.awt.*; public class Mypacman extends JFrame implements Runnable{ int x; public Mypacman(){ setVisible(true); … | |
I want to save selected text file as html file i have written following code JFrame parentFrame = new JFrame(); JFileChooser fileChooser = new JFileChooser(); fileChooser.setSelectedFile(f12); fileChooser.setDialogTitle("Specify a file to save"); int userSelection = fileChooser.showSaveDialog(parentFrame); if (userSelection == JFileChooser.APPROVE_OPTION) { File fileToSave = fileChooser.getSelectedFile(); System.out.println("Save as file: " + fileToSave.getAbsolutePath()); … | |
How can I keep track of the unguessed letters yet in my JTextArea? In the non gui version I used an arraylist, worked fine but should I leave the arraylist and use it to track unguessed caracters ? The method is still console based, just started implementing the gui made … | |
I was trying to figure out how to insert pictures into Java, but as music in the background plays, the pictures alternate. It would be really great if someone could include the music code too. Thanks for any help in advance. | |
Hi Everyone, Can I ask your assistance how to integrate the AMBRA platform in Tomcat? "Ambra is an innovative Open Source platform for publishing Open Access research articles. Architecture Features Ambra is written in Java." Actually, done for installation in tomcat but the Ambra is the next, but how? Regards, … |
The End.