32,199 Topics

Member Avatar for
Member Avatar for gedas

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 …

Member Avatar for gedas
0
131
Member Avatar for unikshegz

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() + " " …

Member Avatar for Ezzaral
0
84
Member Avatar for AlvinLiu

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 …

Member Avatar for AlvinLiu
0
739
Member Avatar for alastair1008

i'm writing a program that can tell me where my curser is and whether the bottons are being pressed

Member Avatar for kramerd
0
124
Member Avatar for buse

please i can someone help me about creating chat massager application, please if anyone one know it please help. thanks

Member Avatar for anthonydonx
0
159
Member Avatar for jems5

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

Member Avatar for jems5
0
2K
Member Avatar for Tankadin

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 …

Member Avatar for kramerd
0
174
Member Avatar for jems5

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 …

Member Avatar for jems5
0
76
Member Avatar for gedas

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 …

Member Avatar for gedas
0
84
Member Avatar for akondray

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 …

Member Avatar for Taywin
0
159
Member Avatar for pyprog

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 …

Member Avatar for Taywin
0
79
Member Avatar for flyingcurry

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 …

Member Avatar for Taywin
0
178
Member Avatar for khaled_jawaher

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

Member Avatar for JamesCherrill
0
328
Member Avatar for rje7

[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() …

Member Avatar for javaAddict
0
167
Member Avatar for adams161

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 …

Member Avatar for adams161
0
190
Member Avatar for virendra_sharma

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 …

0
67
Member Avatar for purijatin

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 …

Member Avatar for purijatin
0
98
Member Avatar for qbmike

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 …

Member Avatar for qbmike
0
179
Member Avatar for Bladtman242

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 …

Member Avatar for Bladtman242
0
267
Member Avatar for Chalandria

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 …

Member Avatar for Taywin
0
134
Member Avatar for Razultull

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 …

Member Avatar for Razultull
0
152
Member Avatar for powerson65

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 …

Member Avatar for powerson65
0
107
Member Avatar for joshianurag18

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 …

Member Avatar for SasseMan
0
134
Member Avatar for famida11

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

Member Avatar for stultuske
-1
78
Member Avatar for bkafroboy69

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

Member Avatar for bkafroboy69
0
114
Member Avatar for richies

public class Test { public static void main(String[] args) { int max = 0; max(1, 2, max); System.out.println(max); } public ststic void max( int value1, int value2, int max) { if (value1 > value2) max = value1; else max = value2; } }

Member Avatar for stultuske
0
114
Member Avatar for ceyesuma

Hello I am trying to get to a Component On a JInternalFrame. I have a reference to the frame on the frame there is a panel. on the panel there is a JTabbedPane. to add a tab to the JTabbedPane I need to reference the Pane. Is there a way …

Member Avatar for ceyesuma
0
167
Member Avatar for Robban

Hi, I have a javaproblem that I just can't solve. "Write a [B]recursive[/B] method who returns the largest value in an array with the signature: [CODE]public int max(int[] v)[/CODE] (Hint: If you need to, use a private help-method) It would be easy if it was allowed to change the signature …

Member Avatar for JamesCherrill
0
185
Member Avatar for shelexelex

hi everyone. my name is chris..i am new to javw pogramming i just have the feelings that i can get what i hv been looking for here.. i startd reading java sometimes ago and i got chocked whn i got to evnt handling... i relly wantto be a java pogrammer..i …

Member Avatar for shelexelex
0
98
Member Avatar for jdiddy

hi, i am creating a small program for an assignment to store and retrieve information from a database. I have created arraylists to add and retrieve the data. just wondering if i am going about it the right way. One of the problems is that when the information is displayed …

Member Avatar for jdiddy
0
84

The End.