32,204 Topics
| |
i need to make a tree canopy in the shape of a pyramid drawn using nested loops the tree should look like this [url]http://cs.nmu.edu/~rappleto/Classes/CS120/Assignments/beach-assignment.html[/url] i have the trunk but i cant figure out the tree top to save my life. any ideas on where to start? thank you to all … | |
Hi, I'm trying to make my own sokoban game in java. Sokoban is a top down 2D puzzle game where you move around a level trying to push boxes to the goal area in the least possible moves. I'm already pretty stuck at an early stage. My first objective it … | |
i just need a method that will draw me a flower but it says illegal start of expression error on line 36. what does that mean and how do i fix it? import java.applet.Applet; import java.awt.*; public class ProjectTwo extends Applet { public void paint(Graphics g) { ///background g.setColor(Color.blue); g.fillRect(0,0,1366,384); … | |
I'm just starting out in java, and I am totally stumped on this assignment. I have to make a program where the user selects a single character and then a file. The program is then supposed to check each character in the file, and output how many times that character … | |
i cant sort it descending? why? please help me!! [code] import java.io.*; import java.util.Arrays; import java.util.Collections; public class alpha { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); int num = 0,c,x,a = 0,d,e,letter1,f; String input; System.out.println("\t[WELCOME]"); for (d = 0;d<=2;d++) { System.out.print("How … | |
i got a question about random number.. this is my sample data : jenny jason jerry peter chriss wayne ralf andre alexis alex garcia lorris ronny lyn armand i wanna pick name above to put in free slot like below.. 1.. 2.. 3.. 4.. 5.. 6.. 7.. - - - … | |
Question is below for the TestSlotMachine. SlotMachine class... [CODE] import java.util.Random; import java.text.NumberFormat; public class SlotMachine { enum CoinSlot { penny, nickel, dime, quarter; } //private String typeOfMachine; public double balance; SlotMachine() { // typeOfMachine = machineType; balance = 0.0; } public double deposit(double amount) { balance = balance + … | |
i have made this code which displays all the values in JTable can any one help me out how to get report of those data.this code is just the module of my library project .Now i want to generate a report for it . [CODE] import java.awt.*; import java.awt.event.*; import … | |
I'm a newbie to JAVA and programming as a whole. I'm trying to write a basic code to declare , which holds a variable named minutes on a job, and assign a value. It should display the value in hours and minutes. An example would be, 197 minutes becomes 3 … | |
So i'm trying to make a module for my program that returns a multidimensional array based on another array in the form of a command-line argument. Here is the module that's keeping me up at night: [CODE]public static double[][][] getDimensions(String [] args) { final int l = args.length; double dimensions … | |
ok so i have 3 separate classes: Product, Action, and Invoice. Action would be my interface that allows me to add and remove items in my hashmap that is in my Invoice class. my Product class would have the instance variables name, info, id and quantity (correct me if I'm … | |
For my school project , I got student details in database and according to system of that school yearly the student standards are raised by one grade . So how can i code so that the data i've entered in database, say 4 grade this year will become 5 grade … | |
public class kgPoundsConverter extends JApplet 12 { 13 private JPanel kPanel; // To hold a text field 14 private JPanel pPanel; // To hold a text field 15 private JPanel buttonPanel; // To hold a button 16 private JTextField kgram; // kilogram 17 private JTextField pounds; // pounds | |
trying to make a payroll program, im pretty sure this is all the code i need. maybe 1 or 2 maybe 3 extra lines. ERRORS: operator * cannot be applied to java.lang.String operator * cannot be applied to double,java.lang.String operator * cannot be applied to double,java.lang.String ERRORS in CODE are … | |
. Goal is for user to input 2 numbers then get a multiplication chart with a row and column. Example: user enters 3 and 5, then should print ...3 4 5 (disregard the dots) 3 9 12 15 4 12 16 20 5 15 20 25 My program will not … | |
Hi, there, I am also very new to Java. For class, I have to create an structure that reflects that of a document stored in a plain txt file. The hyerarchy of the classes is: Class document is made of //complex objects class Page objects, that are made of class … | |
Hello everyone, I need to make a program for Java that has the user enter in 2 numbers,1-9, then prints a top row and column with those numbers in it, then prints a multiplication table for those numbers. I need to use a for loop or for loops. Ex. 2 … | |
Hi everyone I am new to the community and been programming in java for 2 weeks. This is my 3rd program so please take it easy on me, I know there are better ways to do things but this is what I know for now. The purpose of the program … | |
Hi! I would like to add a link to JTable cell. When a user will click on this cell, then a file pointed in the cell will be opened. Could someone tell me some hints? Thanks! | |
Hello ! I am using Java media framework on windows 7. I am making a program to transfer live audio and video using RTP in Java media framework. The problem is that JMF registry contains the built-in camera but when i run program it says that video source is not … | |
Hello. I am currently working on a little password based file encryption feature for an application I am doing. The following is an incomplete function that I have worked on to encrypt some content and (will eventually) write it to a file. [CODE]public static void encrypt(byte [] data, char [] … | |
[CODE]import java.util.Scanner; public class Inti{ public static void main (String [] args){ Scanner kb = new Scanner(System.in); System.out.println("enter name: "); String input = kb.nextLine(); char name1 = input.charAt(0); int blank = input.indexOf(' '+1); char name2 = input.charAt(blank); int lastBlank = input.lastIndexOf(' '+1); char name3 = input.charAt(lastBlank); System.out.println(name1 + "\n" + … | |
Please I need a code in java to convert infix to postfix in java. | |
Dear friends, I have joined a course for SCJP. This is the first time I am learning JAVA. I want to lean the program by solving more practice problems. Does any one has any links which will have lots of JAVA practice problems for a novice programer like me :eek:? … | |
Hey there folks, So I am working on an assignment for class and I have gotten a considerable amount done thus far. I am having some issues with the final important aspect though. The assignment asks that we read a .txt file with a bunch of records of cars sold … | |
Hello guy's, As we know we have the facility to interprete your java script and HTML code on our blog. Any one have idea how to embed our java applet code on the blog. . Suppose i created a registration form using java applet and i want to display it … | |
Hi Everyone, I have a code that permutes Strings, it rather swaps them but I wanted the code to substitute strings, using permutiotions not swap them around... Here is the sample code: import java.util.*; public class PermutationExample { public static void main(String args[]) throws Exception { Scanner input = new … | |
First I apologizeif the answer to my question is somewhere in the hundreds of posts listed. I am new to java and basically clueless. I am suppose to pass an array to a method and then sort the array. I get an "illegal start of expression error when attempting to … |
The End.