32,199 Topics
| |
The writefile method should write out to the given output file all the integers in the given array, one per line. For this part, the merge method should return a new array big enough to hold the content of the first two arrays (a and b), and then the first … | |
import java.util.Random; public class RaceMove { int hare = 1; int tortoise = 1; public int torMove() { Random number = new Random(); int i = 1 + number.nextInt(10); switch (i) { case 1: case 2: case 3: case 4: case 5: tortoise += 3; break; case 6: case 7: … | |
Hello to all! I am learning java. And now I have started section of web apps in java. I have learnt initial level web development by coding on notepad. Now I am using netbeans IDE for java. But in case of web development i am facing a problem using netbeans. … | |
hi everyone I have my individual assignment to do and there is an instruction in it am kinda confused as to how to go about doing it and i dont understand what it meant in round one, it consist of 4 question (random) 1 -4 and is deemed the "Add … | |
I am very much interested in learning programing and software development skills. However i know sotware testing skills, knowledge of hardware, software applications, information security, networking. I do lot or research to learn to develop and desing website with databse integration. I am not financially fit to invest in all … | |
OK, so i do have a perfectly good working code but im trying a different way and its bugging me why its not working. any help would be much appreciated. the program suppose to list all the available directories and then ask the user which directory he's searching for, takes … | |
Hi guys, are we allowed to upload .java files to posts on the forum? the file uploader says not allowed, but I couldn't find the allowed/not allowed list of files anywhere/ thanks | |
Hello guys, so im new to programming, but i've been given task by my school to create a simple games(flappy bird clone) in Java Console, without using java swing. my only help would be a library called Enigma. my concept are simple like this character=*, pipes=I can anyone give some … | |
Hi there, I have two seperate programs - one is a Client, and the other one is Server. I am trying to send an object from Client to Server, but I am getting following error: Exception in thread "main" java.lang.ClassNotFoundException: airtrafficcontrol.AirplaneDetails at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at … | |
Curious who's all used MiGLayout and what everyone's thoughts are on it. Is it a prefered layout over others? If so, which? What do you like and dislike about it? Is there any other 3rd Party Layout's you would recommend? What features do they have that make them recommended? | |
I need to design a histogram that prints out an "*" for certain intergers and the integers need to be read from a text file. I think I got the hole "*" thing down, but the file reading isn't working not matter what I try so I could use a … | |
This is a proto type of a much larger project. I have items that different values and only on needs to be seleced. Then I want to compile alll selected components to new html window for printing or export to .pdf. I have gottent to the end of my knowledge … | |
First question, is there any difference between binary search and recursive binary search??? I looked through google and everything but couldnt find any useful info. I did find irritative and recursive but that was it. and second question: Given a desired search value of 98 and an array with the … | |
Hi everyone this is my first code snippet so be gentle.. I have written a basic client/server chat program that uses multithreading for listening and sending. I welcome any improvements or discussion... Thanks James | |
public class Vegetable { private int calories; public Fruit (int calories){ this.calories = calories; } } public class Onion extends Vegetable { private String color; public Onion (int calories, String color) { super(calories); color = color; } } Why doesn’t Onion constructor method properly set the color? A. The Vegetable … | |
Once i press scan button,i enter info into the fields and after pressing the add info goes to the set.Once i press display all i can see info in JPaneShowMessageDialog ,so all scanned info after added pressed. But how to display info in the same textfields , by pressing the … | |
Hello I try to learn the String.charCodeAt(index) method Here is a snippet that demonstrate that the first index is allways 48 independentely of the character. How work's it (I was expecting that each letter has her unicode-number equivalent. function unicoding(str) { for (i = 0; i < str.length; i ++) … | |
i want link of plugin for web development for netbeans IDE 8.0.2 so that i can download it. | |
This is the program in java which is an interface to stanford postagger. I have attached a copy of it. I am using netbeans 6.7.1 . I have placed the model file which is "left3words-wsj-0-18.tagger" in the bin folder of jdk and also placed the stanford-postagger.jar in that folder. I … | |
Hello, I am trying to build a basic unit framework. I have got this method in a class called KUnit3 public static void checkEquals(double value1,double value2) { if(value1 == value2) { addToReport(String.format(" %f == %f", value1, value2)); passedChecks++; } else { addToReport(String.format("* %f == %f", value1, value2)); failedChecks++; } } … | |
I am trying to write a generic class with at type parameter T, and add a method that takes an ArrayList of type T and returns a standard deviation as type double. My program is compiling with no errors, however the standard deviation is incorrect. It is outputting the standard … | |
| I am trying to make a Java program that uses a tree to collect folder and file information about a directory and display it to the user. Essentially a java version of the tree DOS command. The user inputs a path to a folder and the command window will spit … |
So, my teacher gave me this assignment to write a program to enter a four digit number Andries each digit of the number in a separate line. For example, if a user inputs 1234, the output should be: 1 2 3 4 I'm stuck. Please help ASAP. We have learnt … | |
hiya all i am doing a program here on switch case, have a fair idea on switch case but the lecturer now decides to teach us it the program goes like this. have to find the retail price, commission and enter the employee id num but i having some problems … | |
this all (especially j) but anyone can make their input it is me again, me and my games and them, i am currently trying to build this game but this one is a counting numbers game. am sure you all must have come across it at some point time. i … | |
I have in my program an object of a class. When I try to print it out I am getting "Address@33909752" - guessing it is a hash code. I also tried to override toString method, but still didnt help Address address = new Address(city, country, houseNo, street, postCode); Is there … | |
I am having trouble getting value from getter. I am trying to access the getter method from another class but it returns null. In my Registration Class I have a constructor and getters. In my Client Class I have set the values using Scanner. I would like to create Report … | |
I have a jbutton ,which once clicked ,counts the clicks: int clicked ; private void jButtonScanActionPerformed(java.awt.event.ActionEvent evt) { clicked++; } My question is how to attach this click output(once the button is clicked ) to jtext field to see the click count? private void jTextFieldParcelIDActionPerformed(java.awt.event.ActionEvent evt) { } | |
Hi guys, I'm now looking at what seems to be a nice exercise on my java book. Basically, the exercise asks me to build a virtual keyboard GUI - see screenshot - and when you press each key on your real keyboard the key you've pressed will change its background … | |
I am trying to create a method entitled rolledOneOnlyOnce that takes in two integers as parameters and returns a Boolean. This method must be public and static. In this method, the integer parameters represent the values currently on each of the Game’s die (die1,die2 respectively). Here, you will want to … |
The End.