32,199 Topics
| |
Please Help me I can't start with this project ! Implement a city 'database' using unordered lists. Each record contains the name of the city (a character string of variable length), the mayor of the city and the co:ordinates of the city as integer x and y, Your system should … | |
So when I compile, everything will compile just fine. When I go to run the program, I get this error [CODE]Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at ClientForNoDupCollection.main(ClientForNoDupCollection.java:20)[/CODE] I go to look at line 20(actually 19-21) [CODE]public static void main(String args[]) { File file = new File(args[0]); Scanner cReader = … | |
I have this code i compile it and it ran but nothing came up can someone help with this? [code]import java.util.Arrays; import java.util.Comparator; import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.text.DecimalFormat; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.BorderFactory; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import … | |
Good day sir, can you help me where can i download JDK in java. i have already download JCREATOR pro but i can't download the JDK. i already ssearch JDK but when i download it, it is always interrupted. and i don't know what kind of JDK i download.. can … | |
Hello, I am confused between the differences between a key logger and key listener in Java....i looked online but I couldn't find a straight-up answer. Thanks in advance! | |
I'm writing a program to ask the user for 6 points for a triangle and then calculate the length of the 3 sides, the perimeter, and the area. Then the tester will have to display the properties of the triangle, length of sides, the area, the perimeter, and if the … | |
can anyone tell me how to edit *.avi/*.mp4/*.flv (not images)[B]EXIF/IPTC[/B] information using java?? | |
Hey Guys, I am new here but looking to come here often and obtain some leet skills in java. I am new to programming but do enjoy it. I was just assigned some homework that has me stumped. I would go talk to someone at my school but they are … | |
Im new to java and trying to get buttons to work. My next button works as intended however the first and last do not and the previous one only takes me back one space if i'm on the second item. I need the prev button to rotate backwards through the … | |
Hey guys I keep getting the "no return statement error in two places, I have commented them for you [CODE] /** * A WordsCompare object stores Strings. It is used to determine if the first word * should be placed before or after the second word in the dictionary */ … | |
I want to add a Lable in a JComponent when a button will be clicked. I have added a actionlistner on that button. I've added this.add(label) in the JComponent. but the location, which is set by label.setLocation(...) is not maintained in the JComponent. If i use FlowLayout() in the JComponent … | |
Hey there. I'm planning to develop a software for my father's business. The software is very simple, it has two tables. 1. Stock 2. Sale Whenever stock arrives, the quantity and content will be added to Stock table.. Structure is something like 1. Stock Table | Brand | Quantity | … | |
Hi, I wish to display the homepage of 3 websites (e.g. [url]www.msn.com[/url], [url]www.google.com[/url], [url]www.apple.com[/url]) on screen. What should i use? Is there a tutorial somewhere? | |
I have a problem with getting an input from class A to class B. I already created a method which gets the value but when I call it in class b it returns empty. These are my codes: [B]CLASS A[/B] [CODE] public class log extends javax.swing.JFrame { public String name; … | |
[CODE]import java.util.Scanner; public class Bakery { private static String flavors; private static String weight; private static int quantity; public Bakery(){ this("Chocolate Moist", "1(KG)", 1); } public Bakery(String flavors, String weight, int quantity) { this.flavors = flavors; this.weight = weight; this.quantity = quantity; } public void setFlavors(String flavors){ this.flavors = flavors; … | |
[CODE]import java.util.Scanner; public class Course { private String courseTitle; private double feesPerStudent; private int noOfStudents; private String[] studentName = new String[100]; private int courseCount; public Course(String courseTitle, double feesPerStudent) { this.courseTitle = courseTitle; this.feesPerStudent = feesPerStudent; } public void setCourseTitle(String courseTitle){ this.courseTitle = courseTitle; } public String getCourseTitle(){ return courseTitle; … | |
Hello All, Can everyone help me to solve this problem ? Im doing an assignment about downloading a file and write it to a new file. My problem is the file that I was trying to download is very large, so everytime I compile my Download class and the main … | |
is that any good ideas to fixed the aligment of the output instead of using \t, due to some of the output words have more or less. :) | |
Hello, Working on my final project for a Java Class and have become stumped on the final leg of the code. We are supposed to create a program to add a record, remove a record, display a record, and list all records. The records must be written to a file. … | |
I had quiz today in my IB CS course, and I had a question I could not understand, I will try to stated as closed as possible. "There is an array of integers which holds an unknown amount of integers but it's not bigger than a 100. if a = … | |
Alright I think I'm getting closer but now my program skips by my System.in feature so the radius is never enter and just runs to completion any help would be greatly appreciated [CODE]import java.util.Scanner; public class Square { static class Circle { float radius; public double CircleInfo() { Scanner in; … | |
hi evry one ,im not used to java and i hate its bad compiler can any one tell me whay it give me this running time error:array index out of bound! this is the code were it have the erorr: [CODE] public class RotatingBieChart extends JApplet { int diamter,radius; int … | |
How to find the slope of a point on a parabola with loops? | |
Hi again guys. I currently have a class named [B]ElementSet[/B] which houses an array of objects as well as an array of boolean values which pertain to two function tasked with flagging or unflagging an individual object. I also have an abstract class, [B]Element[/B], and two inheriting classes named [B]Subscriber[/B] … | |
[CODE]public class Fan { final int SLOW = 1; final int MEDIUM = 2; final int FAST = 3; private int speed; private boolean on; private double radius; private String color; public Fan(){ speed = SLOW; on = false; radius = 5; color = "Blue"; } public Fan(int speed, boolean … | |
I want to add a selectable image to a PadDraw() of a JFrame container. So how can I do it? I've got a idea that it can be done by JLabel, but I think it's not selectable. So, how can I add that? | |
The book I'm using says it should look something like this [CODE] import java.io.*; public class main { public static void main(String[] argv) { String fil = "CormeOn.bat"; FileWriter fw = null; try { fw = new FileWriter(fil); } catch(FileNotFoundException fnf) { System.out.println("Yea...."+fnf); } catch (IOException e) { e.printStackTrace(); } … | |
I am stuck in this code. I have to print results every 30 tosses for 500 total tosses. I made the 30 but in the loops. And also percentages are showing as 0 Help or hints would be much appreciated. [CODE]import java.util.Random;// program uses class Random public class CoinTossing { … | |
how can i check a given string to form a palindrome or not for(i=0;i<str.length();i++) { if(str.charAt(i)==str1.charAt(i) } } | |
I would like to know when NullPointerException comes in java. any help would be appreciated. |
The End.