35,618 Topics

Member Avatar for
Member Avatar for jamesonh20

Hi there I have a rookie question. I am trying to clean up a long list of if statements for a class in java, I know that in C# you can code #region-->#Endregion. Is there a simple way to do the same thing in Java? THANKS! Jameson'

Member Avatar for jamesonh20
0
104
Member Avatar for devstarter
Member Avatar for balmark
0
367
Member Avatar for kavitha0904

im new to java ..im learning myself.. i want the source code for 12hr to24hr conversion of time.. ie if i give input 1pm then my program should gives this in 24hr version as 13hr..... i hope u pepole will help me.... Regards kavitha

Member Avatar for balmark
0
237
Member Avatar for qariella

After the list, sum, average, max and min have been printed, ask the user to enter a value. [B]Then print the id of each salesperson who exceeded that amount, and the amount of their sales. Also print the total number of salespeople whose sales exceeded the value entered.[/B] The bold …

Member Avatar for qariella
0
986
Member Avatar for code_warrior

[I][COLOR="Red"]This code enables the user to enter a number and finds the prime from 2 to the entered number..Please name it PrimeNumbers.java Hope it'll help u..[/COLOR][/I]:D

Member Avatar for atong
0
262
Member Avatar for rocky89

A perfect number is one for which the sum of its divisors (excluding the number) is equal to the number itself. For examples 6 is perfect since the three divisors of 6 (excluding 6) are 1, 2, and 3 which add up to 6. The number 8 however has divisors …

Member Avatar for stultuske
-1
190
Member Avatar for enbeeone3

[QUOTE]Your are supposed to create a class book comes with, id, name, author, price and other two informationn of it. Inside the class, you need to create constructor, and methods to manipulate it. [/QUOTE] thanks in advance.

Member Avatar for stephen84s
0
108
Member Avatar for coolest_987

I am making a project on j2ee but i am facing a little problem ie.[B][U]How can i play mp3 songs in jsp? [/U][/B]I ask this question to many person but no one was able to answer my question.Plz consult Discussion Community about this question. I am finding this question since …

Member Avatar for peter_budo
0
420
Member Avatar for Tigerdude

I'm supposed to be inserting words from a text file into a BST and AVL tree. I've got the words to insert correctly, and it recognizes whenever the words are repeated. It just leaves the count at 2 instead of incrementing afterwards. Can't seem to figure out why it's not …

Member Avatar for javaAddict
0
605
Member Avatar for crazy lady

Newbie trying really hard to understand what she is doing wrong. Your help would be appreciated. <?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHMTL 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhmt1-strict.dtd"> <!-- Fig. 8.12: Product order.html --> <!-- Product script. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Product Orders</title> <script type …

Member Avatar for javaAddict
0
76
Member Avatar for crazy lady

Newbee needs help with program. If you would be so kind to tell me where I am going wrong. <?xml version = "1.0" encoding = "utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHMTL 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhmt1-strict.dtd"> <!-- Fig. 8.12: Product order.html --> <!-- Product script. --> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title>Product …

Member Avatar for javaAddict
0
90
Member Avatar for j1979c

[B]Hello, I'm currently having some problems with the StringTokenizer from java util. I've declared a StringTokenizer like: [COLOR="Red"]StringTokenizer token = new StringTokenizer(line,"|"); [/COLOR] to token out a string read from a txt file such as: [COLOR="Blue"]Diablo|RPG|PG|PS2|20[/COLOR] and it works fine(detects all the "|" as delimeters) :) The problem now is, …

Member Avatar for javaAddict
0
287
Member Avatar for kvass

This program creates 2 methods for convenience: menu() and binaryQ(). The menu method accepts several strings as its parameters. The first of the strings is the question to be displayed at the top of the menu. The following strings are the menu choices. For instance, if you call [icode]Confirmer.menu("What is …

Member Avatar for kvass
-1
199
Member Avatar for ajay_tabbu

my program is compiled.but on run that i have message "Exception in thread "main" java.lang.NullPointer Exception" 1. class Rev 2. { 3. char a[]; 4. char i=3; 5. void str() 6. { 7. for(i='A';i<'D';i++) 8. { 9. a[i]='i'; 10. } 11. } 12. void show() 13. { 14. for(int i='A';i<'D';i++) …

Member Avatar for BestJewSinceJC
0
161
Member Avatar for JessJames

Hey, I dont know where to start with this problem so I have a super class(Transaction) that has a constructor and I have 2 sub classes (rental and return )they both have the same constructor as the super but they have a toString method that is almost the same but …

Member Avatar for kvass
0
82
Member Avatar for sandyben

i hava a code called home.java [CODE] import javax.swing.*; import javax.swing.JScrollPane; import javax.swing.JTextArea; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.Random; import java.util.*; import java.text.*; class home extends JFrame implements ActionListener, Runnable { JButton btndetect,btntest,btnstart,btnexit,btntransfer; ImageIcon ic,ic1,bc; JLabel lbltitle; JTextArea textArea ; JScrollPane scrollPane; JPanel panel; Thread t; public home() …

Member Avatar for sandyben
0
2K
Member Avatar for themarval

I've searched the page but i can't find a way to mark my previous post as closed. This is slightly different so i was not sure if i should create a new post or add to my existing one. Not trying to break any rules intentionally. in this post i've …

Member Avatar for mrnutty
0
153
Member Avatar for J-Rock

Hey guys, im pretty new to java as this is my first time ever taking such a course, and i have an assignment that i have to complete that im stuck on and i have no idea what to do next. Heres what i have so far, and i doubt …

Member Avatar for kvass
0
123
Member Avatar for themarval

I have built a program that will select 5 random cards and display the output as text. I want to add an image to display. In my code i've declared each of the card images, but I'm not quite sure how to tie in the graphic to the output. if …

Member Avatar for BestJewSinceJC
0
149
Member Avatar for BuhRock

I am having trouble creating the code to end the program if the user enters -99. I have everything else done. The int "testNum" is what holds the value for -99. Can someone point me in the right direction on how to make it where when the user enters -99 …

Member Avatar for kvass
0
145
Member Avatar for RaigaX9

Hi, I need help with this program here. I want to print an isosceles triangle. But, I keep ending up with this here where they are being spaced: --------* -------* * ------* * * -----* * * * ----* * * * * ---* * * * * * --* …

Member Avatar for RaigaX9
0
3K
Member Avatar for willpower927

Hi, i want to develop an instant messenger using a P2P architecture.. please help me out with the initial steps

0
48
Member Avatar for beGinneR24

Hello, i have a question. How do you compare 2 words or integers? the idea is a program should prompt the user to enter 2 words in one sentence (so like "apple orange") then it reads the 2 words and compares them to see if they are the same or …

Member Avatar for BestJewSinceJC
0
128
Member Avatar for Taimoor Rana

// close an account with a given number public void closeAccount(int id) { } this is a bank project... a customer account is created(array). i would like to know how to delete an array? let say: account number 185649 is found in array[15]. then i would like to delete this …

Member Avatar for BestJewSinceJC
0
165
Member Avatar for Majestics

[url]http://www.jformdesigner.com/doc/help/layouts/gridbaglayout.html[/url] Please visit this website, there is a image of a dialogue box , can anyone help me please making them. I dont want full code just some hints . Thank You.

Member Avatar for BestJewSinceJC
0
93
Member Avatar for mrbool
Member Avatar for Salem
0
74
Member Avatar for devstarter

hi people does anyone know how to change the backcolor on a Jtextfield, when the component gets the focus? thanks

Member Avatar for BestJewSinceJC
0
46
Member Avatar for needhelpbadly

I'm a beginner, and I was wondering how to write a java code for this: * *** ***** ******* ***** *** * I'm using DrJava. This is supposed to be in a diamond formation. Hopefully it posts that way. Thank you :)

Member Avatar for VernonDozier
0
106
Member Avatar for Dasau

I have problem compile this. Line 23 having a problem ( possible loss precision, required int, found double). [CODE] public void actionPerformed( ActionEvent e ) { try { // call a function to get the value - if an error occurs, // display a message box and set focus to …

Member Avatar for BestJewSinceJC
0
474
Member Avatar for talha06

Hello to all, Despite I added all necessary .jar files to project, I always take boring exception warnings that say "class not found". I added the code and exception output below. I'll be so happy if someone can help me. Thanx in advance.. With regards, T ----------------------------------------------------- [CODE]protected void doGet(HttpServletRequest …

Member Avatar for talha06
0
3K

The End.