32,199 Topics
| |
I tried to make a program that would give the whole factors for an inputed number. When i run it throught the command prompt it gives me a bunch of 1's, how do I make it to print each factor only once? import java.util.Scanner; public class Factors { public static … | |
I am trying to write a program where the user can enter a height and width and it creates a hollow box of asterisks. I can get the stars to print out but what is wrong with my code that it is putting them in weird lines. How do I … | |
how can i synchronize any method or constructor in java by using socket | |
Hello guys! I need advice. So I'm working on a Reservation feature of a system. I have created a DAO's for Customer, Employee, and CustomerInquiries. I will explain to you how this works first. The customer creates a "customer inquiry" on the company website to inquire about rental of buses. … | |
hello i m writing a program in which i try to write on the frame by mousemotionlistener and mouselistener methods till now i did the writing part and i i want to start that writing by clicking the button Ok then another frame is open in which i can write … | |
I just started learning Java. I need to make a chat messenger project in java for my college project. The messenger should be able to send messages,add persons to chat and to see who is online. I have only one month of time for my project. Please tell me how … | |
I have a program nearly complete - it creates a bank object which creates within it customers and accounts of multiple types and can successfully load this information to display on the screen. The problem is that I am now trying to deposit or withdraw a given balance which has … | |
I am writting a code to show the number of ways we can pick k # of objects from n total # of objects, and order them without repetition(n choose k). I am given the recrusive for public static long tough(int x, int y) { if (x < y) return … | |
Hi I am using razorflow chart software to create a dashboard, this works perfectly on my dev server(Locally) but when I upload it to hosted server(Web) it does not load properly. https://www.razorflow.com/ I get the following errors: value is not a number Uncaught TypeError: Cannot read property 'split' of undefined … | |
Hello, I am getting this error org.apache.jasper.JasperException: The absolute uri: <requiredURI> cannot be resolved in either web.xml or the jar files deployed with this application. Although the required jar is present in the classpath I am still facing this issue. But if I insert the same jar into web-inf/lib folder … | |
First off, here is the code I will be referencing: package com.airamerica.dataConversion; import com.airamerica.Airports; import com.airamerica.Person; import com.airamerica.Products.Products; import com.airamerica.Products.Tickets; public class FindObject { public static Airports findAirport(String airportCode, Airports [] airportsArray){ Airports airport = null; for(int j = 0; j < airportsArray.length; j++) { if (airportCode.equals(airportsArray[j].getCode())){ airport = airportsArray[j]; … | |
Everytime I run this nested code, I just get stuck inside of an infinite loop.. any help? I'm not familiar with nested loops at all. I'm supposed to be getting: 123456 12345 1234 123 12 1 public void displayPatternII (int lines) { System.out.println("\n\tPattern II\n"); for (int i = 6; i … | |
Hi guys why am I getting the error identifier expected at the package statement ? Here is my code. package com.example.abstract; public abstract class Car{ private double price; private String color; private String year; private String model; abstract double accelerate(); abstract double horsePower(); public void setPrice(double price){ this.price = price; … | |
Hi guys , Assume the following is my program, is there a way to see how the memory is being allocated by the java program ? How do I use jconsole to find out where in main memory that Integer i = 10 is being saved? public class IntegerCmp{ public … | |
It took me 4 weeks to write this code. The chess game works now . there are no bugs... everything confirms to the chess rules (part from stalemate that i was too lazy to do). i have been learning java for 4 months. what do you think of my code … | |
Hello guys. I'm trying to create a registration form that takes in employee information. The error I'm getting is: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 I'm … | |
I'm a tad confused on a homework assignment. I'm supposed to write a program that displays a table of the Celsius temperatures 0 through 20 and their Fahrenheit equivalents. I got the loop to work just fine, but I'm supposed to display the results of the loop in a TextArea … | |
Hey guys I'm looking for some insight in what would be the best way to stop and start a java program remotely with my cell. "For free". Lemme know ANY ideas!!!! Thanks Scheppy | |
Hi i have a bit of code: On the 1st day of Christmas, my true love sent to me A partridge in a pear tree. On the 2nd day of Christmas, my true love sent to me Two turtle doves, And a partridge in a pear tree. On the 3rd … | |
Actually when the main function is running in a class, it implictly speaks a Main thread is in running in background. public static void main(String[] args){ ...... } Now when we create a thread objects in the above function like this . For example : public class NewThread extends Thread … | |
So, I have heard about code porting, basically where you take existing code from one language, and translate it to another language. What I want to know is how does this process work? Are there automated tools for preforming this type of thing, or is it always a manual process? … | |
I have three files 1. Bank Instance 2. Bank 3. Main // Bank Instance.java public class BankInstance implements Runnable { public Bank bank; public Thread t; public BankInstance(Bank bank,String nameOfCustomer){ this.bank = bank; t = new Thread(this,nameOfCustomer); t.start(); } public void run() { System.out.println("========================================================"); System.out.println("Initial amount in bank"+bank.displayAmount()); System.out.println("Amount after … | |
So I have 2 files: M.java, and construct.java. In construct .java, I have 5 instance variables, and made a constructor to initialize the variables. I have also created an getters, adn setters for each instance variable. In Main. java, I created an array: construct[] c= {new construct(int1, string1, string2, string3, … | |
Hi All, Good Day I need some clarification , When serializing the inner class alone(implements Serializable only for inner class) I am getting java.io.NotSerializableException: SerializeinnerClass. At the same time when I am serializing static inner class I am not getting that exception. can any one explain me. Thanks in advance … | |
I'm given a code that asks us to have the user input a set of integers(they can be positive or negative). Then the code goes through the list and counts the occurence of each number. Once it reaches the end, the code displays ONLY the number with the most occurrences, … | |
- - - - - - - - - * - - - - - - - - * * - - - - - - - * * * - - - - - - * * * * - - - - - * * * * * … | |
Hi there, I am having a problem using this scanner. I would like to find a specific value in the text file inside of my textfile is: 1 iamSamantha 143iluvu Samantha Jones 23 Female 2 AdamLambert ilove8 Adam Lambert 25 Male 3 saharaDoneth doneth123 Doneth Sahara 28 Female heres my … | |
I am using javascript, Html, css, Bootstrap,than i want to implement customise product like upload photo on mug, t-shirt and other products. Than suggest me, how to implement this fearture. |
The End.