35,618 Topics
![]() | |
mr7b .. To calculate the value of e^x ,, I do this code but I THINK I have mistake . . ! Can any one tell me if it's true or not > ? [CODE]package calculate; import java.util.Scanner; public class Main { public static void main(String args[]){ double x, n, … ![]() | |
[CODE]import java.util.*; //You may assume that all Points are unique. public class PointSet { private ArrayList<Point> list; private Comparator<Point> compareMethod; //default constructor public PointSet(){ list = new ArrayList<Point>(); } //copy constructor for a point public PointSet(PointSet l){ list = new ArrayList<Point>(); for(Point p: l.list){ this.add(p); } } //randomly generating a … | |
Thanks for taking the time to open this. I am just starting to learn Java and cannot seem to get past a point in the program I'm currently working on. I'm making a credit card verifier, where you enter the numbers and an algorithm deems it valid or invalid. I … | |
I have to create a program that simulates flipping a coin. The directions my teacher gave me are as follows: 1. Program should prompt the user for number of runs 2. Program should prompt the user for the number of times to flip the coin in a single run 3. … | |
[CODE=java]import java.util.Scanner; class Sum { private int value; public int get() { return value; } public void set(int sum) { this.value = sum; } } class Summation extends Thread { private int upper; private int lower; private Sum sumValue; public Summation(int upper, Sum sumValue) { if (upper < 0) throw … | |
I'm just learning Java, so please bear with my ignorance. I have a feeling (hope) that this question has a very simple answer, just one that is evading me at the moment. For our assignment, we have to write a boolean function that will take a given elephant, "e" (the … | |
Hey guys, what would be a neat why of geting every third token in the string. lets say there is a: String longString= "i want this"; how would i be able to get "this" ? Thanks | |
It keeps giving me this error and i really need help! [CODE] package net.minecraft.src; import org.lwjgl.opengl.GL11; public class ModelMrsMcDade extends RenderLiving { //The three numbers below change the size of your model (you'll need to change the hitbox size too though) protected void preRenderScale(ModelMrsMcDade entity, float f) { GL11.glScalef(1F, 1F, … | |
Hello everyone I have a task of changing values in an int[][], for example if I input 1 it is changed to 0 and vice versa. So far I tried the following for a hundred times amending the xs and ys but with no happy ending. [CODE] public void reverseOrder(int … | |
I have a server in python and client in java and i want to share images through the socket how can i do so? help plz | |
Hello, I've a question about DataOutputStream. I'm trying to complete this Pseudo-sentence: [CODE] public void writeObjectToFile( DataOutputStream output ) { < Writing data field values ​​to file. > } [/CODE] This is my code: [CODE] public void writeObjectToFile( DataOutputStream output ) { String filename = "test.dta"; try(output = new DataOutputStream(new … | |
I have done almost all things in my project. I think file SlList.java in my project has something wrong( in insert function). When I insert something in the middle of link list, I rest disappear although I link the rest to the next of the node I want to insert. … | |
please anybody can give me the access code for "Introduction to Java Programming, Comprehensive, 8/e" book if you've.. | |
Okay, been working on Android program and since its JAVA based, I figured this might be a place to get some good advice. I have been writing this program to run tcpdump, but for some reason it freezes and crashes. I am able to execute the shell commands, but after … | |
Hello all, I am new to this forum. I think this will be an excellent place for learning things and I am looking forward to gaining more java knowledge. My current predicament is the ArrayIndexOutOfBoundsException I am getting on a program I have written. I haven't been able to figure … | |
when i tried to send an email to an account it does not sent. the error result will be displayed. i got an error in the apache tomcat bin log like this: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port:25; nested exception is: java.net.ConnectException: Connection refused: connect at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1934) … | |
Can anyone help me to convert String to BigInteger. please | |
Hi guys well what I want to do is play a video clip when my program starts. My menu has been set up to how I want it to look. I've researched how to do this but I cannot seem to find anything that I want. All I find is … | |
So I'm doing this simple draw program where I let the user click a button, i.e. Rectangle, and then click any desired place on the JFrame to draw it. Now, I want the user to first click on the JButton, then click anywhere on the JFrame (so that I get … | |
Hey there guys, this is my first post here. Really pretty website I must say. I guess you'd expect a programming website to be well built. Haha. But anyways, I've been having some problems recently with a JFrame. I'm a beginner, but I usually do pretty well with resolving errors. … | |
![]() | I have problems with choosing a line and to find a number or times specifif word repeats in that line? Can you help me with that? [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; public class DefectInspector { private JFrame frame = new JFrame(); private JPanel p1,p2,p3,p4; private JMenuBar jmb; private JMenu … |
HI I had generate a report with IREPORT 3.7 . I have now a .jasper file. I would want to be able to execute (show) it with a jsp file or servlet. My generated report not use sql queries, only it need 2 parameters. i think to pass these parameters … | |
hello, i have written the below piece of code for calculating the power function, but when i run the program, it shows the wrong result and i verified it by calculating manually. so please help me to get the correct result. [CODE] public class powerFunction { public static void main(String … | |
Hello y'all. I am in the midst of an exciting project, and I've hit a little bump. I'm trying to do a 'deep copy' of a TreeMap<String, State> [B]so that I can work with one (delete, insert, etc...) and preserve the other for later.[/B] Instead of having to code up … | |
How to implement a DHT in Java? Basically I need to know how to implement a lookup algorithm for DHT. The idea is to grasp java RMI and lookup algorithm of DHT. | |
Ok you guys are my last hope, i've tried searching what i need and i cant find it. i really tried searching.... but i just don't know exactly what i'm really searching for... i have to do the following project in c# (wrong post haha) but if you could help … ![]() | |
Having some difficulties getting this assignment to work. What, I'm having trouble completing is creating an conditional statement that calculates interest for the amount of years entered by the user at the interest rate they enter and displays it in a message box. This is my code so far: [CODE]import … ![]() | |
Hey I have this code [code] FileUtils.forceDelete(new File(nombreprograma+".zip"); FileUtils.forceDelete(new File(nombreprograma+"/"+nombrebmp+".bmp")); [/code] Deleting the zip inside of the root works perfect but for some reason the BMP inside of a folder, doesnt. The error it gives is that it cannot delete the file, nothing else. Any tips? | |
Hi, I am currently doing a JDBC project where I am manipulating data in a Access DB on a table named empDetail and one of my tasks has got me stumped, considering I only started learning about JDBC yesterday. I hope somebody can give me a bit of direction as … | |
Hi everybody Help me please to figure out what's wrong with my code When I try to compile it it gives me an error ClassNotFoundException I have never had such an error befoure, so I don't know what to do.... [CODE]import java.util.LinkedList; import java.util.List; import java.util.ListIterator; public class Example { … |
The End.