32,204 Topics
| |
So We will create a java program but i don't know how to start it. We should use OOP in this one. And there should be minimum of 3 classes (including the main).. Buy n’ Sell An electronics and appliance store would like to install a kiosk for customer use. … | |
im new to java and need help with this code. i need to show stars to represent the numbers which have been entered. so far my for loop is only showing the one star, how can i get it to show the number of stars which represent the amount of … | |
I want to create linked list of type LinkedList<LinkedList<Integer>>. I plan to take integer values from user (via console), create a linkedlist by adding the values. Create multiple such linked lists and then create a master linkedlist which will have individual linked lists as its elements. Example: User types 1 … | |
Hello all. I have a string, e.g. "Testing" and I try to convert it to byte but I get a NumberFormatException. I tried with (byte), Byte.Parsebyte. Any help? thanks | |
May I know how to find the largest number in an array? | |
Hi guys, This week Ive been given a problem to: Take a set list of English phrases and convert them to a set list of pirate phrases. i.e. Hello would be entered by the user and Ahoy would be printed etc. My idea is to create two arrays, One will … | |
Hi, I have a task which involves using a queue in order to fill an enclosed region. For example I have chosen this 2d array to apply a flood fill technique to. [CODE] int[][] shape ={ {X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X,X}, {X,X,X,0,0,0,0,0,0,0,0,0,0,0,0,0,X,X,X,X}, {X,X,X,0,X,X,X,X,X,X,X,X,X,X,X,0,X,X,X,X}, {X,X,X,0,X,X,X,X,X,0,0,0,0,0,0,0,X,X,X,X}, {X,X,X,0,0,X,X,X,X,0,X,X,X,X,X,X,X,X,X,X}, {X,X,X,X,0,X,X,X,X,0,X,X,X,X,X,X,X,X,X,X, {X,X,X,X,0,X,X,X,X,0,0,0,0,X,X,X,X,X,X,X}, {X,X,X,X,0,0,0,0,X,X,X,X,0,X,X,X,X,X,X,X}, {X,X,X,X,X,X,X,0,X,X,X,X,0,0,X,X,X,X,X,X}, {X,X,X,X,X,X,X,0,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,X,X,0,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,0,0,0,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,0,X,X,X,X,X,X,X,0,X,X,X,X,X,X} {X,X,X,X,X,0,0,0,0,0,0,0,0,0,X,X,X,X,X,X} … | |
Dear team, Hi all i have implemented google data api in my project. I have downloaded the api from the below url.This api is used to delete,add,update the google contacts.I have successsfully add ,list the new contacts. [url]http://code.google.com/apis/contacts/docs/3.0/developers_guide_java.html#GettingStarted[/url] But i do no how to delete the contact using this api … | |
Hi! I would like to change the string: [ICODE]"reg_num, reg_date, attached_file, Description"[/ICODE] to the new string: [ICODE]"reg_num, reg_date, Description, attached_file"[/ICODE]. So, what I need is to search the substring "attached_file" and put in at the end of the main string. How could I do that? Thanks! | |
Am writing this program using two classes for my school project from last 4 days. I have completed this program I think but when am running this program, it shows no error also it doesn't show any logic or runtime error..just got blank screen after compiling. Am wondering that why … | |
can you guys help me with my assignment given to me, my prof. said .. create a java class that will accept four Integers & develop a method that will arrange the accepted integer from highest to lowest. example: if you enter random number like: [B]10 6 7 9[/B] the … | |
can somebody help me to put an action in a button that comes from a different class. Specifically t [code]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; class LogIn implements ActionListener { private JFrame f,f2; private JButton jLog, jCan, jReg,jOk; private JPanel j1, j2, j3, j4,j5,j6; private JTextField jText; private … | |
Hello! I was curious if i could help any guidance on my problem. In my program i have the following class. [CODE] class Match{ String File; String Area; int Score = 0; //public Match(int Index ){ public Match(String File,String Area, int Score){ this.Area = Area; this.Score = Score; this.File = … | |
I understand that this code will not run because i have 2 string and 1 float type in my text file and i am storing them as int's but how do i do this?.. please someone help me this is so frustrating Here is my .txt file [QUOTE] 100 200 … | |
I am having serious trouble and i don't know what exactly I'm doing wrong can someone please help. Here is the question ? In this assignment you will create a console (standalone) application. This program will allow you to select MegaBall lottery numbers. For the first 5 numbers you will … | |
GridBagLayout question My main class holds frame and gets left and right panels from other classes [CODE] /** * Matthew Schrum * 11/14/2010 */ import java.util.Random; import javax.swing.JFrame; public class Sim { public static void main(String[] args) { //variables LeftPanel leftPanel = new LeftPanel(); RightPanel rightPanel = new RightPanel(); //GUI … | |
"LeftRightPanel.java:45: setText(java.lang.String) in javax.swing.JLabel cannot be applied to (int) label.setText(num1);" I'm guessing that this is because I'm trying to imput a int in a line where there's supposed to be text. Can I do something like .setNumber, .setNum, or .setInt? Or is this an issue that I need to adrress … | |
new in here, new in java world and new in programming at large, but i believe i can learn with the help of professionals and educators in the house. Don't be surprise am staring from such task as a newbie, it 'cos am made to believe i must find a … | |
The below method is for my database assignment, and we are supposed to check if the "username" the user adds is already in the database. Somehow "newRecord.username = sc.nextLine();" this line does not work, the second time through the do-while loop It seems like it just ignores the line or … | |
I need to make a string by using a loop to a method from ohter class that is named speak(), and is seperated by a \n the problem is in the class public String allSpeak() [CODE] /* public String allSpeak() ( if (count = null) { System.out.println("No Animals to Speak"); … | |
For the final part of this assignment I need to do the following: Any help/advice/starting pointers would be great! 1) Create a row of Alien attackers, class RowOfAlien, patterned after the partially filled array. Put five Aliens in the row. When the row hits the left or right of the … | |
Hello all! I am starting to write a little roulette game and while trying to print out my arrays to make sure they contain the correct values the compiler keeps screaming this at me: "non-static method .... cannot be referenced from a static context" Any pointers would be greatly appreciated! … | |
hello guys im a newbie in programming pls. sdvice what java programming book should I buy. pls... for the newbie ^^ | |
Hello, I am working on a server-client app but I am facing a problem. The problem is that I don't know how to do unmarshalling properly. As an example. The client sends a request to obtain alist of existing blog records from the server. The server connects to the DB, … | |
I'm resizing images (making them smaller) and am wondering if there is a programatic way to determine the variance of an image using JAI. High level, I want to be able to tell when I've scaled an image down so much that it no longer looks good. I understand that … | |
Hey all, i have written a short program which outputs a basic Histogram in this form: (0-25) *** (26-40) **** (41-75) ** (76-80) **** (81-100) ** I'm required to alter my solution so as well as that it also outputs it vertically so i'm after something like this: * * … | |
Hey guys, in my programming assignment I need to split the mantissa and exponent and add them to two separate variables. so £1.88 would be [CODE] double amount = 1.88; //then after the conversion mantissa = 1; exponent = 88; [/CODE] I've looked at this a lot over the web, … | |
Hello friends, I have a Customer class (Parent class) and Member class (child class which extends Customer class). the coding is like this [CODE] public class Customer { String name; } public class Member extends Customer { int memberID; } public class Tranasaction { public void printTransaction(Customer customer) { if(customer.memberID … | |
Hi! I have a Java application that works with MySQL DB. Until today I used latin alphabet, but now I would like to extend my application to working with cyrillic alphabet. As far as I know, it is possible to use UTF-8. But I don't know the way, in which … | |
Hey all. I have a deadline tomorrow, and this thing is killing me, so I come to you with hopes of help. I have a couple of classes. An info class, which converts a string to ints and puts it in the [B]values[/B] array. Another class (plotter), is supposed to … |
The End.