32,204 Topics

Member Avatar for
Member Avatar for pgset

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 …

Member Avatar for NormR1
0
32
Member Avatar for shandow

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 …

Member Avatar for adams161
0
416
Member Avatar for pgset

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); …

Member Avatar for adams161
0
148
Member Avatar for justsimplenick

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 …

Member Avatar for NormR1
0
90
Member Avatar for alleybye

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 …

Member Avatar for adams161
0
63
Member Avatar for shahreza

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.. - - - …

Member Avatar for NormR1
0
109
Member Avatar for kezkez

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 + …

Member Avatar for kezkez
0
161
Member Avatar for DeadSoul

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 …

Member Avatar for Ezzaral
0
100
Member Avatar for merban

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 …

Member Avatar for NormR1
0
144
Member Avatar for Khodz

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 …

Member Avatar for Khodz
0
168
Member Avatar for DanHu

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 …

Member Avatar for NormR1
0
508
Member Avatar for sheiyvin
Member Avatar for 47pirates

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 …

Member Avatar for 47pirates
0
124
Member Avatar for SC803

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

Member Avatar for Nick Evan
0
85
Member Avatar for joewinsock

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 …

Member Avatar for joewinsock
0
141
Member Avatar for muraj

. 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 …

Member Avatar for muraj
0
1K
Member Avatar for coding101
Member Avatar for ankilosado

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 …

Member Avatar for ankilosado
0
468
Member Avatar for Fadam360

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 …

Member Avatar for muraj
0
165
Member Avatar for tedmyers

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 …

Member Avatar for tedmyers
0
171
Member Avatar for LianaN

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!

Member Avatar for NormR1
0
2K
Member Avatar for Awais Ahmad

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 …

Member Avatar for CrazyDieter
0
99
Member Avatar for bops

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 [] …

Member Avatar for Stefano Mtangoo
0
340
Member Avatar for plasticfood

[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" + …

Member Avatar for plasticfood
0
104
Member Avatar for AB Nite
Member Avatar for Ghosh

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:? …

Member Avatar for harman thind
-1
88
Member Avatar for nobodycool

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 …

Member Avatar for nobodycool
0
128
Member Avatar for mohit007kumar00

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 …

Member Avatar for NormR1
0
47
Member Avatar for sanelepatrick

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 …

Member Avatar for NormR1
0
72
Member Avatar for sandawg

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 …

Member Avatar for Ashok Agarwal
0
126

The End.