32,204 Topics
| |
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 … | |
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 … | |
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 … | |
[url]http://portals.apache.org/jetspeed-2/[/url] how can help built my towns web-index? | |
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 … | |
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 … | |
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 … | |
[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 … | |
how to calculate columnwise total in excel sheet in java using HSSFworkbook | |
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 … | |
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 … | |
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] /** … | |
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? | |
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 … | |
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 … | |
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.*; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 ................. | |
[url]https://www.edline.net/files/_IXADp_/d6877670786901263745a49013852ec4/ProgramAssignment2.pdf[/url] That is my assignment for AP Comp. Sci. Thanks in advance! | |
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 … | |
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 … | |
///////////////////////////////////////////// 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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.