32,204 Topics

Member Avatar for
Member Avatar for dpirtle83

import java.util.Scanner; public class Compute{ public static void main(String[] args){ Scanner input = new Scanner(Scanner.in); System.out.println("Enter three numbers"); double.int= v0=5.5; double.int=v1=50.9; double.int = t= 4.5; System.out.println("5.5-50.9/(4.5)"); } } i am having trouble with writing this program, what am i missing to finding the average for this , or is it …

Member Avatar for brandonrunyon
0
127
Member Avatar for 47pirates

I want to display the data stored in my database(I'm using Ms Access) when i Clicked a View button in my GUI. Everything goes smoothly, as well as even the query is executed the the values are not visible in my panel where i've added the table. Suggest me what …

0
39
Member Avatar for SergeantJoKer

Hey everyone. I could use some serious help with a Java method that I have to construct for my CMIS class. Basically, I have to develop a static method that has two arrays in it, one a String array that has values of colors; the other, a Color array that …

Member Avatar for NormR1
0
180
Member Avatar for lse123
Member Avatar for NormR1
0
82
Member Avatar for ceyesuma

hello I need a temp fix for putting times into my form. I suspect that soon I will have to work with some kind of calender class that will send selected data in all the correct formats. I have no clue. BUT right now it stop me in the first …

0
65
Member Avatar for ceyesuma

MusicSys:unsolved: Hello Could someone tell me which (if any combination of code to use to put a date in a derby db using a JFormattedTextField? [code] createBooking ...etc ..., book_date DATE, ...., ... [/code] here are the many tries I have so far [code] if (i == 3) { //I …

Member Avatar for ceyesuma
0
622
Member Avatar for ceyesuma

MusicSys:unsolved JDesktop:JInternalFrame out of scope ///////////////////////////////////////// Hello; I Have a JDesktopPane that opens with a x frame (JInternalFrame)wit a JMenuBar and 11 JTabbedPanels .produced by x.class.I click the menuItem to produce z.frame using x.class a new JInternalFrame with 4 tabbedPanels on it again produced by x.class. Now I click on …

0
27
Member Avatar for plasticfood

[CODE]double wholeCost = kb.nextDouble(); double markupPercent = kb.nextDouble(); double markup = markupPercent/100.0; double retailT = calculateRetail(wholeCost, markup); System.out.println(retailT); public static double calculateRetail(double num1, double num2){ double markupPrice = ((num1 * num2)+ num1); return markupPrice;} [/CODE] i've been staring at this and can't figure what is wrong with it. the compiler …

Member Avatar for plasticfood
0
74
Member Avatar for rocky4everurs
Member Avatar for masijade
0
1K
Member Avatar for kezkez

Hi Everyone, I have to add a static method Account consolidate(Account acct1, Account acct2) to an existing Account class that creates a new account whose balance is the sum of the balances in acct1 and acct2 and closes acct1 and acct2. The new account should be returned. (only accounts with …

Member Avatar for vaibhav1983
0
1K
Member Avatar for Little Bunny

A question was asked to me which is as follow: There is a class Fruitlist which has a sub class apple and there is a class Fruit which has a sub class orange FruitList uses Fruit (* not sub classed, only uses it) and Apple uses Orange Is there something …

Member Avatar for vaibhav1983
0
121
Member Avatar for packetpirate

I'm trying to draw a string at the center of an applet. The problem is that it's STARTING to draw at the center of the applet and going off to the right. I need for the center of the string to be centered. Here's my code so far: [CODE] /** …

Member Avatar for NormR1
0
1K
Member Avatar for jemimaloh

Hi everyone, does anyone know how i might implement a 2D Vote table? Would using a 2D array for it be possible? I'm trying to implement a voting system for the indexes into hash table arrays. Any ideas?

Member Avatar for jemimaloh
0
106
Member Avatar for hany-h

Hi guys, I have a file named DrawPanel and this class is supposed to draw different shapes which i declared before by using mousedrag. I am not able to draw more thatn one shape and put them in an array.It seems that i don't know where to change the value …

Member Avatar for NormR1
0
276
Member Avatar for newbie_java

Hi! I am just a newbie here! I just wanna ask how to do the file handling in java applet? Do I have to do the certain policy/permission to perform it? If so, how would I do it? And another one, how can I close the APPLET WINDOW once I …

Member Avatar for NormR1
0
470
Member Avatar for Jawahar prabhu

Here the code for get three digit value 'n' and calculate r=2^n+1 then find that value 'r' is a prie or not, here i like store the integer value 'r' without exponential function and big Integer, please make a great help to me. thanks in advance.. import java.*; import java.io.*; …

Member Avatar for stultuske
0
137
Member Avatar for end3r

Hy, I have a .properties file with a key-value defined like this: [icode]my_property.value=text text text bla bla bla {0} qwerty {1}.[/icode] I need to know what class should I use if I want to read the value and insert parameters in {0} and {1}. In the past I used to …

Member Avatar for end3r
0
4K
Member Avatar for bops

Hello. When implementing a KeyListener in my application I have the following code. I have added the KeyListener to a JTextField control using addKeyListener(this) and the current class implements KeyListener. [CODE] @Override public void keyPressed(KeyEvent ev) { System.out.println("Pressed: "+ev.getKeyCode()); } @Override public void keyReleased(KeyEvent ev) { System.out.println("Released: "+ev.getKeyCode()); } @Override …

Member Avatar for bops
0
967
Member Avatar for Nidhi S.
Member Avatar for Eric Cute

Hi everyone. Im trying to upload a file to an ftp server. I found this code in the internet but its not working for me. Can anyone please tell me where the error is?? This is my code [code]import java.io.*; import org.apache.commons.io.FileUtils; import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPClient; import org.apache.commons.net.ftp.FTPFile; public class …

Member Avatar for Eric Cute
0
334
Member Avatar for ni30rocks

I have tried to connect to gmail using IMAP and specification given on [url]http://mail.google.com/support/bin/a...n&answer=78799[/url]. My code looks like [CODE]StreamConnection socket; byte serverData[]= new byte[50]; byte accountInfo[],emailAddInfo[]=new byte[500]; try { socket = (StreamConnection)Connector.open("socket://imap.gmail.com:993"); DataOutputStream oStrm = socket.openDataOutputStream(); oStrm.writeChars("Account Name:username@your_domain.com");//my account name oStrm.writeChars("Email Address:username@your_domain.com");//my email address InputStream iStrm = socket.openInputStream(); iStrm.read(serverData); String …

0
98
Member Avatar for nirajs

Hi, I am neal from india from india i want to discuss on online test software in java i hope you all will help me for this. please .................

Member Avatar for nirajs
0
165
Member Avatar for OcarinaSensei

[url]https://www.edline.net/files/_IXADp_/d6877670786901263745a49013852ec4/ProgramAssignment2.pdf[/url] That is my assignment for AP Comp. Sci. Thanks in advance!

Member Avatar for coil
-1
129
Member Avatar for diyez treze

please help me to create a code for this using Bufferreader.. thanks Welcome to Nancy's Addition Tutorial Program! ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ Enter 2 3‐digit numbers please, separated by a space and press enter: 123 678 You requested the following operation: num1: 123 num2: + 678 ‐‐‐‐‐ 1st addition: last digit of each …

Member Avatar for NormR1
0
88
Member Avatar for Yutxz

Hey guys, I'm having a little trouble with my Java homework. So far I'm stuck on problem 3.5, C). My code so far is: [CODE]package multadd; /** * * @author Josh */ public class Main { public static void multadd (double a, double b, double c) { System.out.println ( a …

Member Avatar for Yutxz
0
135
Member Avatar for ceyezumma

///////////////////////////////////////////// make .jar runnable ////////////////////////////////////////// Hello; I can make a .jar from my program and move it to a folder in my progject but I would like to make it runnable. So I have shown the Command to make the -cmf (non runnable) .jar that works fine. I will show …

Member Avatar for ceyesuma
0
264
Member Avatar for ceyezumma

j ///////////////////////////////////////// Hello; I Have a JDesktopPane that opens with a x frame (JInternalFrame)wit a JMenuBar and 11 JTabbedPanels .produced by x.class.I click the menuItem to produce z.frame using x.class a new JInternalFrame with 4 tabbedPanels on it again produced by x.class. Now I click on x.frame and try to …

Member Avatar for ceyesuma
0
280
Member Avatar for steveh000

Hi Guys I am really green when it comes to regex , I have never had to use it much but here goes, I want to be able to remove html tags from a string so I am only left with the content. i am using [CODE] String.replaceAll("<(.|\n)*?>","");[/CODE] This doesnt …

Member Avatar for adams161
0
88
Member Avatar for GDICommander

Hello everyone! When I'm starting a OSGI bundle in my Apache Felix container, I have a ClassNotFoundException. This is the output that I have: [CODE] start file:/C:/Users/Pierre-Alexandre/Documents/NetBeansProjects/Prototype1/src/Prototype1Client.jar 23-Sep-2010 10:43:12 AM org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService bundleChanged INFO: bundle changed: null 23-Sep-2010 10:43:12 AM org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService bundleChanged INFO: bundle changed: null 23-Sep-2010 10:43:12 AM org.apache.cxf.dosgi.discovery.local.LocalDiscoveryService bundleChanged …

Member Avatar for GDICommander
0
5K
Member Avatar for vinay1424

I am facing one problem in this type of pro-gramme where i use Class name as a Return type or pass object as an argument like here , i am getting same error(the class already defined), i am using eclipse. [CODE] ****class Test //showing error that the class Test already …

Member Avatar for NormR1
0
377

The End.