32,204 Topics
| |
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... | |
[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; ^ | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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.. … | |
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 … | |
how to use messagedeigest class to bring security to a file...encode and decode a file... any suggestion ????? | |
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 … | |
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 … | |
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 … | |
[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 || … | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
i want to use chinnes language in my application i need any information | |
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 … | |
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 … | |
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. … | |
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? | |
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; … | |
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 | |
hi all i want to make the column name in french language can any one help me please ????????thank you | |
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 … |
The End.