32,199 Topics

Member Avatar for
Member Avatar for BuhRock

So I have this assignment where I am acting as a set. A set that holds numbers. In other words an array I am guessing. So he gave us a generic interface. Then we have to use another class and finish those methods. I'm having trouble because I've never used …

Member Avatar for stevanity
0
167
Member Avatar for harsimran05

when i use border layout and centre alignment, my label content is appearing on left side but i need it on right side, suggest any change here is my code [CODE]import java.awt.*; import javax.swing.*; import java.awt.BorderLayout; class Welcum extends JFrame { Container c; JButton bFd,bAcct; JLabel lWelcome; public Welcome() { …

Member Avatar for harsimran05
0
94
Member Avatar for caswimmer2011

Hey, I've had this question for a while now and forgot to post a thread asking it. I'm really interested in databases and i've been wanting to create a program that recalls information from a database. I've done one that reads a text file but that just seemed...boring to me. …

Member Avatar for caswimmer2011
0
85
Member Avatar for vishalbhavsar

Hi, I am trying to generate javadoc from the file "C:\Program Files\Java\jdk1.6.0_26\src.zip" by using the command "javadoc". But I am not able to do it. How to use that command?

Member Avatar for JamesCherrill
0
107
Member Avatar for bhavna_816
Member Avatar for ranu jain

please some one would explain me why we use Bufferedreader() instead of using InputStreamReader() only.

Member Avatar for JamesCherrill
0
178
Member Avatar for selma_aktra

Hello! I write a simple java program. The user will give a URL adres which have some flags. I will parse the URL by this flags. For example the user will give [url]www.exampledomain.com/abc/[/url][[FLAG1]]/abc_[[FLAG2]]gfc I need to parse load to string parsing the URL: String[1]=www.exampledomain.com/abc/ String[2]=/abc_ String[3]=gfc I need to ask …

Member Avatar for selma_aktra
0
178
Member Avatar for harsimran05

i have a a file Fd.java in which i am trying to call constructor of another class TRrelatn and both the classes are kept in same folder but it is giving error as well as exception that is :\Fd.java:368: cannot find symbol symbol : class TRrelatn location: class FrmAdd new …

Member Avatar for Zaad
0
182
Member Avatar for nagatron

If have a java program with 4 JTextField. In my JButton add, the event code goes like this: [CODE]add.addActionListener( new ActionListener() { //Handle JButton event if it is clicked public void actionPerformed(ActionEvent event) { try { String add = "insert into person (firstName,middleName,familyName,age) values ('"+inputs[0].getText()+"','"+inputs[1].getText()+"','"+inputs[2].getText()+"',"+inputs[3].getText()+")"; st.execute(add); //Execute the add sql …

Member Avatar for nagatron
0
106
Member Avatar for harsimran05

i am trying to create a project file from existing main files , i create my project file(FixedDeposit) where other files are kept i want to add, and i use the option add existing file and add all the files i want to add. And i make the main of …

Member Avatar for harsimran05
0
80
Member Avatar for Prisms

Hey guys I'm new to java and was wondering if I could have a little assistance. I need to have a user input their number of classes, hours for each class and the grade they received after the information is given i need to calculate their GPA. I have gotten …

Member Avatar for Prisms
0
3K
Member Avatar for hardsoft123

I have been stuck on this program for MANY DAYS and I really need help. I am a total NOOB! I don't know what more to do. I am far too confused. THIS IS WHAT MY PROGRAM SHOULD OUTPUT: Play the game of Precaution. Try and create as many unique …

Member Avatar for Ezzaral
0
248
Member Avatar for Narayanan87

HI I am new to regex, could anyone help me in finding the java code using regex: My input string is : MyData 68309486 Bob I want to fetch only the digits in sequence like 68309486. PLz help me!!!

Member Avatar for thekashyap
0
155
Member Avatar for jtodd

Hey guys! I am kind of new to Java and am having issues understanding why this code will not run. Any advise would be greatly appreciated! Thanks in advance! [CODE] // Phone.java // Program creates a GUI that resembles a phone with functionality. import java.awt.*; import java.awt.GridLayout; import java.awt.event.*; import …

Member Avatar for JavaStudent321
0
430
Member Avatar for Chitru

I don't know am i asking right question or not but my question is: I want to create a simple search site so I've team with different jobs. I have its database part to handle. I should create its database and i have not idea what should i do. I'm …

Member Avatar for MartinPlatt
0
132
Member Avatar for ITHope

So when I compile it says i'm missing an if statement at line 38/39 but im using nested else if's and when I take it out it causes more errors. [CODE]import java.util.*; public class lhlBanking { static final double servicecharge_savings = 10.00; static final double servicecharge_checking = 25.00; static final …

Member Avatar for NormR1
0
149
Member Avatar for NyQii

Hey guys! I'm new to java, I have to write a program using a linked list, that will prompt a user to enter 10 names, and display them reversed. But is has to be a GUI. Any idea where i can start, or give me some clues, i would really …

Member Avatar for NyQii
0
159
Member Avatar for baby_c

Hello friends..! I tried to implement HeapSort algorithm in Java. but I've got some problems. First I should say that I have tried to implement the algorithm mentioned in the book "Introduction to Algorithm". the first question is how we can maintain the heap size? The book doesn't help with …

Member Avatar for baby_c
0
141
Member Avatar for Sekhrian

Hi hi What would I add to this code in order for it to pick a random word from the txt file? [CODE]try{ RandomAccessFile raf = new RandomAccessFile("Words.txt", "rw"); guessme = ""; while ((guessme = raf.readLine()) !=null){ guessme.toUpperCase(); } }[/CODE] Help is much appreciated!

Member Avatar for Sekhrian
0
87
Member Avatar for ITHope

my assignment was to create a calculator using either if statements ir switch methosd i opted for the switch method. everythign compiles but when I type in two integers this is what comes up:Enter two integers to be calculated (separate using space): 2 3 Exception in thread "main" java.lang.NumberFormatException: For …

Member Avatar for ITHope
0
274
Member Avatar for ITHope

So i had to write a program that uses these functions to add, subtract, multiply and see if the numbers equal each other. and also You must create a way to keep track of the relationships between friends, the spouses, the siblings, the children of the men and women. attached …

Member Avatar for ITHope
0
141
Member Avatar for java.util

Hello, I have this code that's giving me some problems: [CODE]import java.util.Scanner; class Bæreevne{ public static void main(String[] args) { int avstand, vektTre, vektBetong; Scanner tastatur = new Scanner(System.in); System.out.print("Oppgi antall meter mellom søylene"); avstand = tastatur.nextInt(); vektTre = 3000 - 20*avstand*avstand; vektBetong = 7000 - 80*avstand*avstand; if (vektTre > …

Member Avatar for Taywin
0
148
Member Avatar for masterofpuppets

This is my first GUI program in Java. If finds the day of the week for any given date which is after 1 January 1900.

Member Avatar for glen dc1
1
800
Member Avatar for ABUMIN

I will be interviewed Monday or somewhere along the school week, to take an IB Computer Science course. I told the teacher that the programming class I had was a bit too essay and told her I had experience in C++, C# , VB, and python (basic). But I will …

Member Avatar for jwenting
0
119
Member Avatar for mistersalty

Hi this is my first post, but I've lurked for a while usually finding answers to my questions in other threads, I couldn't find this one so I broke my posting cherry to ask. I know I'm missing something, probably really simple, but possibly I'm doing this completely wrong. I'm …

Member Avatar for jee08
0
166
Member Avatar for anuran

iam building a training set for spam filtering using java,training set data is given as words in text files in one folder,but im unable to debug whats going wrong in java collections [CODE]/* *folder part 1 conatins various text files having name format * **spmsg***.txt and ***legit***.txt e.g 11927legit569.txt ,106127spmsgc26 …

Member Avatar for anuran
0
171
Member Avatar for neemo6

Well I just got a new latop with windows 7 and downloaded textpad 5 to do my java homework. At first I had issues just trying to compile but then found out that i needed to point textpad to javac.exe for it to compile. Now my problem is i cant …

Member Avatar for Taywin
0
216
Member Avatar for logicmonster

I have to calculate the number of days between two dates the hard way. I know there is already a way to do this with an existing package and such but I have to do it within a single method "daysBetween" without altering any other part of the code. The …

Member Avatar for logicmonster
0
980
Member Avatar for twistedspoon

I'm having trouble understanding the binarySearch method in the Arrays class when using an Object array. Is it possible to use this method to search for a specific field within an object in an object array? For example, if my Object array is an array of Person objects, each with …

Member Avatar for Ezzaral
0
122
Member Avatar for crazins

Hi im trying to make a program that passes an array to a method. the method then finds the smallest number in the array and passes that number back to the main where its printed out. I am getting an error saying: "error: number cannot be resolved to a variable". …

Member Avatar for crazins
0
110

The End.