35,618 Topics

Member Avatar for
Member Avatar for alreem

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, …

Member Avatar for ztini
0
2K
Member Avatar for sariberri

[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 …

Member Avatar for sariberri
0
908
Member Avatar for ladybro

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 …

Member Avatar for stultuske
0
154
Member Avatar for NicoleD90

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. …

Member Avatar for NicoleD90
0
700
Member Avatar for iRamble88

[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 …

0
175
Member Avatar for 09cody

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 …

Member Avatar for JamesCherrill
0
299
Member Avatar for gedas

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

Member Avatar for JamesCherrill
0
1K
Member Avatar for MineCrafter

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, …

Member Avatar for JamesCherrill
0
584
Member Avatar for johang_80

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 …

Member Avatar for johang_80
0
193
Member Avatar for 47pirates

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

Member Avatar for dantinkakkar
0
169
Member Avatar for Stjerne

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 …

Member Avatar for JamesCherrill
0
155
Member Avatar for vuquanghoang

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. …

Member Avatar for Philippe.Lahaie
-1
256
Member Avatar for divsok

please anybody can give me the access code for "Introduction to Java Programming, Comprehensive, 8/e" book if you've..

Member Avatar for StephNicolaou
0
114
Member Avatar for luskbo

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 …

Member Avatar for luskbo
0
281
Member Avatar for artemis_f

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 …

Member Avatar for stultuske
0
1K
Member Avatar for archie.herbias

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) …

Member Avatar for archie.herbias
0
199
Member Avatar for adil_bashir
Member Avatar for TIM_M_91

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 …

Member Avatar for TIM_M_91
0
479
Member Avatar for Hitman Mania

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 …

Member Avatar for JamesCherrill
0
168
Member Avatar for Samwal

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. …

Member Avatar for JamesCherrill
0
216
Member Avatar for mehnihma

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 …

Member Avatar for stultuske
0
115
Member Avatar for jhonilson

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 …

Member Avatar for Amunantha
0
951
Member Avatar for adil_bashir

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 …

Member Avatar for dantinkakkar
0
167
Member Avatar for freedomflyer

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 …

Member Avatar for ~s.o.s~
0
1K
Member Avatar for igotaquestion

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.

Member Avatar for dantinkakkar
0
159
Member Avatar for Mxlfa

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 …

Member Avatar for ztini
0
283
Member Avatar for miss_lovely

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 …

Member Avatar for ztini
0
185
Member Avatar for riahc3

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?

Member Avatar for dantinkakkar
0
282
Member Avatar for Sonny101

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 …

Member Avatar for dantinkakkar
0
132
Member Avatar for shean1488

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 { …

Member Avatar for thines01
0
226

The End.