32,199 Topics
| |
I'm trying to find a way to search an array to see if the values entered bu the user are already in the array. For example, if numbers[0] = 1, and the user tries to input numbers[1]=1, then I want the program to kick an error back that won't allow … | |
Gudday all. Im new to dis site and also new to java programming. I hav an assignmnt to write a program dat computes d grade point average of a set of eight courses and i dnt knw how to go abt it. I wil appreciate an urgent reply pls. | |
I am a learner in java . I want to connect my MYSQL database table to a combo box. I created 3 combo box on my jpanel.When I select first two combo box items its automatically call the data base and show the particular content from my table in the … | |
I would be really nice if someone presents an idea of how to link mySQL with A Java Program.. Tried it many times but unsuccessful. An example would be much useful. Thanks!!!!!!! | |
Write an application that reads a line of text from the keyboard and prints a table indicating the number of occurrences of each letter of the alphabet in the text. For example, the phrase To be, or not to be: that is the question: contains one "a," two "b's," no … | |
Here is my code: [code] import java.util.*; public class SavingAccount extends BankAccount { // Begin public class SavingAccount extends BankAccount private double minAmount; public boolean withdraw(double amount) { // Begin public boolean withdraw(double amount) if (getbalance() >= amount + minAmount) { // Begin if statement super.withdraw(amount); return true; } // … | |
hey i had started coding in java.I want to display the pixels format of image with the following code but i get errors...Can anyone suggest my code?? [code]public void Pixelvalue(Image img){ int[] pixelss = new int[w * h]; PixelGrabber pg = new PixelGrabber(img, 0, 0, w, h, pixelss, 0, w); … | |
Hi , can any one explain me this code public class Howcome { public static void main(String[] args) { System.out.println(“Bank of America”); [B][url]https://www.bankofamerica.com[/url][/B] System.out.println(“Online Banking”); } even though https:// BofA lyin as orphan string in between this codes compiles and executes fine..??? | |
[CODE]import java.util.*; public class EmployeeNames{ private String EmpYee []; private int count; int x; public EmployeeNames(int size){ String EmpYee []=new String [size]; count=0; } public EmployeeNames(){ this(10); } public boolean isFull(){ return count= EmpYee.length; } public boolean isEmpty(){ return count=0; } public void add(int x){ if(! isFull()) EmpYee[count++]=x; else System.out.println("\n … | |
| |
Hi All, Can any one help me in editing a column value in a table and save the changes to the database I am usig a piece of code as follows [CODE] private void process() { // Wait Cursor. CBRCursor waitCursor = new CBRCursor(this); try { // Get the chosen … | |
please can someone help me find the uses of the codes below and reference,the kind of book or the internet char At() sub string() toupperCase() tolower Case() equals() Startswith() endswith() equalsIgnoreCase() replace() compareTo() index of() | |
Can anyone help me in join the 3 combo boxes with filters The main idea is there are 3 combo boxes when we select an item in the first combo box the related items should apper on the remaining 3 combo boxes and when we select an item on the … | |
im currently building a game who wants to be a millionaire..the interface is already done but there was an error..there was an incompatible types exception..here is my code..it says found java.lang.String but expected java.awt.event.ActionEvent..help please [CODE]public class MillionaireBoard extends JFrame implements ActionListener { private MoneyLabels a; private JLabel A; private … | |
I have a scenario where i am given a file that contains info such as: (just a sample) img01.jpg|Washington DC|aquarium|puffer fish|seahorse img02.jpg|CHICAGO|AQUARIUM img03.jpg|Chicago|fish where the first section is the "image" (just a made-up name, not an actual image) and the rest of the words are keywords. ive been able to … | |
I am having a problem with running my Derby embedded db. I have to set the path and I tried the following commands. the first one is wrong and I would like to learn how to remove it.please. the other ones do not seem to work . I have a … | |
[COLOR=Blue][B]hi.i've written a program that loads #'s into an array and sorts them.The end user then inputs a number and the program is supposed to perform a sequential search for the input number and tell wether it was found or not found.I'm hoping someone canhelp me with my sequential search.binary … | |
Good morning all. I've run into a slight stumbling block with some code I'm writing. I'm sure you've all seen the numerous Mortgage Calculator threads so I hope you're not too sick of them yet. Basically, I need my code to first ask the user for a decision, then based … | |
Hey i am a beginner in programming. My code looks like this: public ChatClient1(String screenName, String hostName) { super("Chat"); String host=(args.length<1)?null:args[0]; ...and it continues. The error I am getting when i compile is: cannot find symbol symbol: variable args and its for both the args in the code above. this.screenName=screenName; | |
Hey! I started using java this year and I finished a java project but when I try moving it somewhere else in my directory it does not execute anymore. My project directory tree goes like this (I am using eclipse)... (ignore the "-") /Root - /bin -- JavaProgram.class -- JavaProgramMain.class … | |
I'm writing a code in Java where input is a user generated integer string and I have to reverse the integer and check for boolean true or not. I'm stuck at the math portion because I can't exactly figure out the mathematical process of trying to reverse an integer. [CODE]// … | |
My problem is to design a program that uses a mathematical model for heat loss, or Tnew = Told - m(Told - Tair). It also asks me to repeat the code for 60 minutes, generating a new answer every minute. I have completed the code, however I receive no output. … | |
[code]import java.util.Scanner ; public class Verk6 { static public void main(String[]args) { Scanner scan=new Scanner(System.in) ; double[] a=new double[1000] ; Stats stats=new stats() ; int i=0 ; while(scan.hasNext()) { a[i]=scan.nextDouble(); stats.add(a[i]); i++ ; } Arrays.sort(a, 0, i) ; if(i%2==0) { int m=i/2 ; System.out.println("Median value:"+(a[m-1]+a[m])/2.0) ; } else { System.out.println("Median … | |
pls help me . . . give me some hints on how to do this program . . . a program that displays a mirrored-right triangle using asterisk. the program should ask the user to enter the number of rows and displays the mirrored-right triangle. the minimum is 3. there … | |
I am getting the following Errors when I am linking the .pdf document I am using the following piece of code[CODE] String lPathPrefix = "file://muceap10.muc.amadeus.net/User Step Folders/BPS_Files/Outlooksoft CPM/01 - Production Environment/01 - Documentation Library/01 - Documents/Daily_Checks/"; String lPath = (lPathPrefix + doccolvalue).replace(" ", "%20"); URI lURI = new URI(lPath);[/CODE] java.awt.Desktop … | |
Hi!! I have written three classes (two of which are most relevant) and am required to construct an operating calculator. This is the CalculatorPanel: [CODE]/* * CalculatorPanel.java * * Lab 19, COMP160, 2010 * * An alternative GUI front end for the Calculator class * */ import javax.swing.*; import java.awt.event.*; … | |
okay i've been using bluej for learning purposes but i kind of hit a snag would it be possible for someone to code me a main method so that it works as stand alone program please [code] public class Circle { private int diameter; private int xPosition; private int yPosition; … | |
Hi guys, I'm working on a program which is essentially Rock Paper Scissors Vs. the computer. Anyway I'm having a bit of difficulty with it and could use some assistance. I need to use a class method, so I decided to separate the computer's choice in the class method, I'd … | |
I believe all of my logic is sound, but syntax is off a bit... -ask for total numbers -for loop to input total numbers -1)input first number -2)throw exception "must be positive" -3)if negative > back to 1 -4)if no exception > calculate average This is my first program using … | |
Im trying to create a program which acts like a fruit machine at the moment i am writing an action listener to work with the spin JButton. i have a number of IconImages constructed. could i possibly set these images as an array and then use the random int method … |
The End.