32,204 Topics

Member Avatar for
Member Avatar for taga1989

M just an infant to java..just kno the ABC.. m tryin to work in small projects like address book...so can i get help like how to start...

Member Avatar for muthu@tent
0
151
Member Avatar for maverick420

[CODE] import.awt.Rectangle; public class AreaTester { public static void main(String[] args) { Rectangle R = new Rectangle(5,6,7,8); System.out.print("w: "); int w = R.getWidth(); System.out.println(box.getWidth()); System.out.print("h: "); int h = R.getHeight(); System.out.println(box.getHeight()); int area = w*h; System.out.println("Area of Rectangle:"+ area); } } [/CODE] The above code gives error:<identifier> expected import.awt.Rectangle; ^

Member Avatar for dimasalang
0
529
Member Avatar for willywhomperz

[CODE] package code; public class CharacterCounter { /** * int numberOf(String s, char c) * * Returns the number of time the char c occurs in the String s * * @param s is the original String * @param c is the char whose count in s we want to …

Member Avatar for dimasalang
0
408
Member Avatar for isebas

Yes, I am a total newbie. I am doing this code for homework. It is giving me an error on the method line is saying that it is missing.Please help. [CODE]import java.io.*; public class discount {public static input in = new input(); public static void main(String[] args) throws IOException; {double …

Member Avatar for dimasalang
0
195
Member Avatar for Satyrn

I am trying to simplify Maven to use one POM to do both a 64 bit build and a 32 bit build. I have tried to separate the build into two separate executions however I am required to set the compilerExecutable tag specified by the maven-native-plugin to point to either …

Member Avatar for Satyrn
0
393
Member Avatar for jeraldmuthu

Hi i have generating xml file for chart(fusion chart). that chart having swf format file for each chart. i'm creating xml in case statement( case 1 for horizontal bar xml(file),case 2 for verical bar xml(file)) i have created that file by giving straight path it is not servlet it is …

0
129
Member Avatar for selma_aktra

Hello! I write a command line program with java on eclipse. I use this code to get a sound from the beep.wav file. But i can not hear anything from the eclipse. [CODE]try { File curdir = new File ("."); File soundFile=new File(curdir.getCanonicalPath() + "\\beep.wav"); Clip clip = AudioSystem.getClip(); AudioInputStream …

Member Avatar for selma_aktra
0
233
Member Avatar for Matth963

[CODE]import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Calendar; public class CheckIn{ Date today; void getArrivalDate() { DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); try { System.out.print("Enter Date in dd/mm/yyyy format: "); String d = Keyboard.readString(); today = df.parse(d); df.format(today); } catch (ParseException e) { e.printStackTrace(); } } void getDepartureDate(){ Calendar …

Member Avatar for Matth963
0
256
Member Avatar for jiraiya

Hi all, I'm trying read in the contents of a series of text files located in a folder in the same directory as a jar file. I've been trying to work out how to do this for a while now, but to no success, so any pointers as to where …

Member Avatar for JamesCherrill
0
15K
Member Avatar for sha11e

I made this tiny code: [CODE] public class main { public static void main(String[] argv) { System.out.println("Hey"); } } [/CODE] It compiles and run fine in eclipse, but when i go into cmd and do javac main.java it created a main.class then I did java main.class but I get errors.. …

Member Avatar for JamesCherrill
0
360
Member Avatar for traxzer

Hey I´m getting some errors, could anyone please help me to get rid of them? Main code [code] import javax.swing.JOptionPane; public class Kontotest { public static void main(String[] args) { Konto bok = null; String navn = JOptionPane.showInputDialog( "Skriv inn navn"); String nummer = JOPtionPane.showInputDialog( "Skriv inn kontonummer"); String saldo …

Member Avatar for JamesCherrill
0
2K
Member Avatar for sathya88

how to use messagedeigest class to bring security to a file...encode and decode a file... any suggestion ?????

Member Avatar for JamesCherrill
0
111
Member Avatar for winecoding

I have a generic text file, which can be composed of text data and numerical values, like an article. It can have multiple paragraphs/lines and have various types of delimiters. My general purpose is to tokenize this text file into a string array. I am quite confusing on how to …

Member Avatar for JamesCherrill
0
247
Member Avatar for janice91

Dear experts, I am trying to practice inheritance coding on my own but i have met some difficulties. I ma supposed to come up with a Square Game with M representing the number of squares. For the start, i will be in the square 0 value and playing by throwing …

Member Avatar for JamesCherrill
0
123
Member Avatar for ajaxx195

Hi, I just started learning Java.I had attached the doc file.The doc file is already printed on paper.I want to make a program such that only place left blank should b allowed for user to input data and when user print the paper it should b able to print exactly …

Member Avatar for NormR1
0
114
Member Avatar for chiiqui

[CODE]public void starGame() { boolean gamestatus = true; casesSetup(); Welcome(); showCases(); setladies(); int choice = player.nUser(); myAmount = briefcase[choice].getAmount(); briefcase[choice] = null; cases--; while (gamestatus == true) { offer = player.offer(turn, briefcase); showCases(); if (cases == 25 || cases == 19 || cases == 14 || cases == 10 || …

Member Avatar for chiiqui
0
136
Member Avatar for esdel

Java seems to be a parasite that lives inside other things I maybe use. It thrives on the ubiquitous scare tactic "Load my latest version or you will be even LESS protected than now" I have read the entire Java "help site". Not a word there about WHY I should …

Member Avatar for jwenting
0
198
Member Avatar for dennysimon

Hi all I try to copy paste from a site java example ,there are 3 files,Main.java,Login.java,and LoginDialog.java. I can compile Login.java ,but when I compile LoginDialog.java,it said that it cannot find symbol Login.authenticate (a method in Login.java) I have check that there is this Login.authenticate method to make clearer I …

Member Avatar for jwenting
0
1K
Member Avatar for dahan

Java is the oops language but why we are call the java is plate from independent language.please give me other thing about the java.

Member Avatar for peter_budo
-1
114
Member Avatar for nagatron

Hello to all java programmers I have a java database problem specifically the auto increment. In my MSAccess I have a table named "[B][COLOR="Red"]Confirm[/COLOR][/B]" and in that table I got two fields, the "[B][COLOR="Red"]confirm[/COLOR][/B]" which is set to text and the "[B][COLOR="Red"]id[/COLOR][/B]" which is set to auto number or auto …

Member Avatar for nagatron
0
965
Member Avatar for isebas

Ok so i just started taking AP Computer Science at my high school and I really have no experience with java (just a little bit with python). So for our fist homework we had to try out a few codes and make some programs. I'm getting a " <identifier> expected …

Member Avatar for isebas
0
239
Member Avatar for lena1990
Member Avatar for Majestics
-2
103
Member Avatar for Jessurider

can anyone tell me how to rotate the inner yellow star within the blue star [CODE=java] import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Path2D; public class app extends Applet { final static int OFFSET = 30; final static int OFFSETS = 30; public void paint(Graphics g) { Graphics2D …

Member Avatar for Ezzaral
1
153
Member Avatar for mcddewitt

I need help in deciding a good path in learning Java. I have recently passed my Data Structures course and although I still have issues and sometimes need to look thinks up, I feel I have a strong enough grasp to move on with my becoming proficient in Java. I …

Member Avatar for hag++
0
187
Member Avatar for Nox_1031

So I need emergency help in writing a program that does a few simple things. I have a file that is composed of positive, negative and zero integers. Each integer has its own line and I'd say there's about 100 lines. I need help writing a program that will 1. …

Member Avatar for Nox_1031
0
230
Member Avatar for k34b

hi all masters here..i want to ask some question about java. hope you all can answer it.. how to explain the concept of accessing object via reference variable?

Member Avatar for k34b
0
47
Member Avatar for Bowsan22

So i posted several days ago about an adding grades to an array, which i managed to figure out. This is the code I currently have. [CODE]public class Grades { public static void main (String[] args) { float result = 0; Scanner scan = new Scanner(System.in); int count = 0; …

Member Avatar for hag++
0
249
Member Avatar for Nathan_11

I am hard up creating a nested loop for this one. can someone help me.Thanks. Output: 181614121 27252321 3634323 454341 54525 6361 772 81 9

Member Avatar for JamesCherrill
-1
117
Member Avatar for lena1990

hi all i want to make the column name in french language can any one help me please ????????thank you

Member Avatar for JamesCherrill
0
69
Member Avatar for sha11e

Can you input a string of text from the console window into a char array? Or do you have to save it in a string, and then do a "s1.getChars( 0, 5, charArray, 0 );" Also, I noticed that you can't initiate a char array using the same syntax as …

Member Avatar for JamesCherrill
0
3K

The End.