32,204 Topics
| |
Hi, need help as to what is the code doing, if possible each statement if anyone knows: When it is run, when dd/mm/yyyy format is enter, it will give 20 Dec 2010 is a Monday Why is the monthIndices and division done for ? [CODE] public static String dayOfWeek(int dd, … | |
Dear all , I have the following UML Diagram and below the associated Code. Can you please help me complete the code? Thanks in advance I have written my UML diagram as follows. -x : double -y : double +MyPoint() +MyPoint(x:double,y:double) +get X() :double +getY() : double +distance: (MyPoint1:MyPoint2):double +distance(p1:MyPoint:p2:MyPoint):double … | |
I keep on messing up the math calculations :@. [U]Error[/U] The output was shown as this" [ICODE] BMR: 40.35 pounds BMI: -83.60 inches TDEE: -114.95 years Your BMI classifies you as Obese [/ICODE] But it should be this way: [ICODE] BMR is 2308.15 BMI is 40.35 TDEE is 3173.71 Your … | |
I'm new to Java and just need a little help....The program is supposed to have the user enter in a series of numbers then displays the largest and the smallest....they have to enter -99 to end. My problem is the smallest number is always -99. What do i have wrong? … | |
ok guys so i have problem here is the goal of this program:Write a Java program that reads in this file and produces a visual representation of the seat assignments, with a passenger's name and his/her seat assignment in each seat slot here is the data in [URL="http://www.cs.oswego.edu/~odendahl/coursework/csc212/201009/assignments/03/seats.txt"]this[/URL] text file: … | |
hey everyone, well i have made a method that would return array of string. the strings would be obtained from the file(employee.txt) every 4th line in the file contains employees loginID i need to store those ids in to one array and then return it. here is the code of … | |
anyone kno why java keeps telling me illegal start of type , in the first if statement thanks in advance Airline reference = search(choice, airlineObjects); if(!choice.equals("QUIT")) { if(reference == null) { System.out.println("wrong flight number enter another flight number"); } else { System.out.println("your file detail is ....."); System.out.println(reference.getFlight() + " " … | |
using recursive Java method [CODE]import java.util.ArrayList; public class Count { private String word; public Count(String w) { word = w; } public ArrayList<String> getUpper() { ArrayList<String> result = new ArrayList<String>(); if(word.length()==0) { result.add(word); return result; } for(int i=0;i< word.length();i++) { if(Character.isUpperCase(word.charAt(i))) { String shorter = word.substring(i); Count shorterCount = new … | |
i'm writing a program that can tell me where my curser is and whether the bottons are being pressed | |
please i can someone help me about creating chat massager application, please if anyone one know it please help. thanks | |
I would like to compare user input against and entire file and print out message when item is found or item not found. My program below appears to do that but it is doings so one line at a time. Please help. Jems [CODE] import java.util.*; import java.text.*; import java.io.*; … | |
hi folks the program I am attempting to do here, even though its horrible so far, is one that reads in a file containing: [code] Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair … | |
In my program I need to have the user get two chances before ending the program. Currently if the condition is not satisfied then they only get one try. I would like some help in getting a second try. [CODE] // Takes user entry Scanner user = new Scanner(System.in); System.out.println("Please … | |
hey everyone, well i got a little problem im trying to write input from the JTextField into the file (file4.txt) but the problem is it keeps overwriting the text file each time i make input and any data ther was is changed in to new data.all i need is that … | |
I'm trying to write a program that, after playing a game with the user, asks if they want to play again. For this test, I want to simply test the first letter of the word they input and if it's a "y" then the game will repeat. at first, I … | |
I was just wondering if there is a method or something in Java that, once a URL has been passed, can determine if a webpage under that URL was written in HTML, PHP, XML, and so on. I looked in URL and HTTPConnection classes but didn't find anything. Maybe missed … | |
The program like the title says is supposed to return the largest integer value in an user-inputted integer array, using binary recursion. And in the case of an empty array, return Integer.MIN_VALUE. I am kind of stuck on the logic of this binary recursive algorithm. I know there is errors … | |
how can i associate jar files with java.exe not javaw.exe in window 7,since if jar file is associated to javaw.exe,then console is not displayed. thanx | |
[code] public class Animal { public void eat() { System.out.println("I eat like a generic Animal."); } public static void main(String[] args) { } } class Fish extends Animal { @Override public void eat() { System.out.println("I eat like a fish!"); } } class Goldfish extends Fish { @Override public void eat() … | |
I figured out how to make indentation with [code=java] SimpleAttributeSet style = new SimpleAttributeSet();// = doc.addStyle(null, null); StyleConstants.setLeftIndent(style, 12); StyleConstants.setFirstLineIndent(style, -12); [/code] and then use doc.setParagraphAttributes(doc.getLength(), 1, style, false); after the insert into document. now numbers there doc.getLenght(), 1, i've been changing around but always same issue. The problem is … | |
Hi , i want to fetch company profile using hoover api , i have my java based application in that i want to integrate company related data , like company name , location , contact no , emailid , company picture . can anyone plz help me for some important … | |
Hello I am making an project in Netbeans and the following is my problem: I deleted some of my .java files of my project and later copy pasted the same files. Now the code runs perfectly fine but Netbeans doesnt detect the packages. I mean inside the code it shows … | |
Hi, I am relatively new to JAVA and especially SQL and I am having trouble with a "cannot find symbol error. I believe it is at this line catch: "catch(SQLExeception e)". Any advise would be greatly appreciated. Thanks, Mike NetBeans code looks like this: [code] import java.sql.*; public class Book … | |
This is probably really more of a math problem. I hope I want have to go into too much (for you, boring) detail about the code, as the problem resides in this loops. Please let me know if I provided too little detail :) Now for the problem: I would … | |
Need help please. This program is supposed to be a do while loop and convert fahrenheit to celcius and vise versa using user defined methods but as of right now it just doesn't work. I need to make a do while loop in main method too, but was just trying … | |
Alright well im trying to code a multiplication table for a webpage im making. This needs to be in a separate java Servlet as opposed to an inline javascript. Basically the code should output embedded html code something like [code] <table> <tr><td>4*0=0</td><td>4*1=4</td><td>4*2=8</td></tr> <tr><td>5*0=0</td><td>5*1=5</td><td>5*2=10</td></tr> <tr><td>6*0=0</td><td>6*1=6</td><td>6*2=12</td></tr> </table> [/code] There is an HTML … | |
Hi i have a program with a JFrame and it has two jpanels on it, one containing the buttons needed and the other which is going to be used for plotting graphs, but when i try to plot an x, y graph on the plotting jpanel it does not show … | |
Hi..i am calling a method where i am selecting a row from DB, this is happening n no of times....bt after somoe no of select statement, connecttion has been lost. Is there any type of limitation with no of select with hibernate. or any issue with .hbm file... my .hbm … | |
how to create a database in Ms Access and connecting it to forms that is created using swings in java using Netbeans 5.5.... can u please explain me with an example in netbeans 5.5 please | |
can anyone help me look over my code? The Course class A Course object should store the department, course number, and course title. It should have linked lists of prerequisites and "subsequents" (the courses for which this course is a prerequisite). The constructor should construct a course given a department, … |
The End.