32,199 Topics

Member Avatar for
Member Avatar for mappersas

I could use some assistance My final project in a python class is to calculate the distance between 2 lat/long points. My code is really just managing the input & output portions, while using existing code (properly credited) in a function to do the actual calculations. I've got it working …

Member Avatar for Peter_21
0
6K
Member Avatar for divinity02

hi guys how are you all, I sincerely hope that you all christmas is shaping up very good. I am doing my individual assignment, yes another one, a take home this time, I am to implemented a payroll system into a company using a for loop and which i did. …

Member Avatar for divinity02
0
191
Member Avatar for venkanna39

Below is the question from a core java interview. Could somebody please help me? There are designation and employee objects. Designation Employee Designation object --> Designation object is in employee ArrayList<employee> emptemp = new ArrayList<employee>(); emptmp.add(R1); emptmp.add(R2); .. .. .. Now we need to write an helper class or utility …

Member Avatar for JamesCherrill
0
103
Member Avatar for Clyde_1

HELLO guys IM beginner using java IM asking what is my problem of my codes?? can you fix it?? import java.applet.Applet; import java.awt.Color; import java.awt.Graphics; public class invalid3 extends Applet implements Runnable { /** * */ private static final long serialVersionUID = 1L; private int x0 , y0 , incx …

Member Avatar for JamesCherrill
0
139
Member Avatar for n0tS0av3rag3

I am doing this assignment in my Java class. I have never done any programming in my past so I am a complete beginner. I have typed up a program that will ask for employee name, the hourly rate, and the number of hours worked. The program needs to run …

Member Avatar for JamesCherrill
0
136
Member Avatar for kayleigh0411

My program compiles with no errors, but when I try to use it, the results do not show up and there is an error. Please help!!! import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; public class RetailSales extends JFrame { // declarations Color black = new Color(0, 0, 0); Color …

Member Avatar for kayleigh0411
0
331
Member Avatar for My_1

How do i put a flag on location that the user right click on it. and how do i put an img to all mine in game board when game is end? I try to put an img but wont work? How can i fix it? here is what a …

Member Avatar for My_1
0
695
Member Avatar for sesaso

Can someone please! Fix this for me? My program : loop reads 10 double numbers after that inserts them into an array list. after that print MAx and MIn And AVg THIS MY PROGRAM WHY I CAN NOT MAKE COMPILE Fix this for me : import java.util.Scanner; import java.util.ArrayList; import …

Member Avatar for sesaso
0
122
Member Avatar for vivekH

Is string primitive value in java? What is difference between primitive value and primitive data type in java? Thanks in advance.

Member Avatar for JamesCherrill
0
86
Member Avatar for KetraCoder

Row 1[ item1, item2, item 3, item 4, item 5, item 6, item 7, item 8] Row 2[ item1, item2, item 3, item 4, item 5, item 6, item 7, item 8] Row 3[ item1, item2, item 3, item 4, item 5, item 6, item 7, item 8] Row 4[ …

Member Avatar for Slavi
0
274
Member Avatar for asif49

Example of problem: Pattern one is: 1, 10, 1: 1 Pattern two is: 10, 10, 10: 0 From this extremely simple pattern we will know that a small value followed by a large increase and then a large decrease means it is a 1. Otherwise its a 0. Using something …

Member Avatar for mike_2000_17
0
314
Member Avatar for Amit_25

hii I have a list having m1 m2 m3........ m922 and in each there are a1 a2 a3 a4 are there like m1=a1 a2 a3 a4 a5 a6 m2=a1 a2 a3 a4 a5 a6 m3=a1 a3 a5 a7 a8 a2 etc and i want this as m1=a1 a2 a3 a4 …

Member Avatar for Slavi
-1
97
Member Avatar for erictheonly1

Hello i need some help on what to add to the following if statement for the out put to read the value of sum times the actual number of sum: public class ICMA42 { /* instance variables */ private int alpha; private int bravo; private int sum; /** * Constructor …

Member Avatar for JamesCherrill
0
184
Member Avatar for erictheonly1

public class ICMA42 // instance variables - replace the example below with your own private int alpha; private int bravo; private int sum; /** * Constructor for objects of class sum which initialises sum to 0. */ public ICMA42() { this.alpha = 0; this.bravo = 0; this.sum = alpha + …

Member Avatar for erictheonly1
0
2K
Member Avatar for Jatin_2

Following Error is shown well going to DGFT India Site. How to Resolve ERROR WHILE SENDING OUTPUT access denied ("java.net.SocketPermission" "164.100.128.143:8100" "connect,resolve")

Member Avatar for JamesCherrill
0
116
Member Avatar for infiniteloop56

Hey Guys, I am building app using a huffman tree, and am building this java program to just test a few things and I am having some trouble. I have everything working except that I am having troble decompressing a huffman string back into the original string. I would appreciate …

Member Avatar for Taywin
0
972
Member Avatar for redtribal23

Is there a way to calculate large numbers without using BigInteger? I am calculating an exponent without using the math class.

Member Avatar for cool_zephyr
0
84
Member Avatar for Krazykado

I am having problems with it continuous loop at the end of the program. Any help would be appreciated. Thank you. Below is the coding so far. [CODE]import static java.lang.System.out; import java.util.Scanner; import java.io.*; public class Investment { public static void main(String[] args) { double principal = 0; double interest …

Member Avatar for JamesCherrill
0
1K
Member Avatar for divinity02

hi all I have a question. I am still trying to build this game/program but I declared a console and was told to import it which i did, the problem is that I am constantly getting an error line underneath the console, can u guys tell me why is that. …

Member Avatar for JamesCherrill
0
164
Member Avatar for GoneGirl

Hi, If you look trough my code you can see that i have tried to print out some values (the mean value) with a scanner from a csv file with the help of an enhanced for loop (the absolut last loop) and it gives me NaN (not a number). And …

Member Avatar for GoneGirl
0
615
Member Avatar for redtribal23

I am trying to convert my code into generic and I get an error at o1 + o2 stating that cannot find symbol for o1 and o2 then bad operand types for binary operator on the push(pop()+ pop()). public abstract class MyStackGeneric <E> extends ArrayList <E> { protected abstract E …

Member Avatar for JamesCherrill
0
108
Member Avatar for EarhawkPH

Hi! Newbie Java Programmer here! I've done a cash register program. this error's pretty unusual to me. i dont know how to fix this. import java.text.*; import javax.swing.*; import java.awt.*; public class CashRegisterV1 { public static void main (String[] args) { DecimalFormat fix = new DecimalFormat("0.00"); //QUANTITIES int Nido = …

Member Avatar for JamesCherrill
0
238
Member Avatar for stephen.hare.7503

so i need help on Modifying the source code to sort on the Title (in ascending order) and display the book title, comma space, author’s first name, comma space, author’s last name. Ensure all your variable names are appropriately named. and i also need help Modifying the source code to …

Member Avatar for stultuske
0
128
Member Avatar for samisallaj

I'm trying to use this code, but it will only display the image in jtextpane and it does not display the text. JLabel label = new JLabel("<html>some text here<img src='http://www.yoursie.com/image.jpg'></html>"); then using this label in JTextPane.

Member Avatar for samisallaj
0
290
Member Avatar for rakibtg

in java jframe swing how i can use system default scrollbar style? eg. the default style looks like [this](http://i.imgur.com/3wrBufN.png).

Member Avatar for JamesCherrill
0
165
Member Avatar for rayan22

double sum = 0; double d; for (d = 0; d < 10; d = d + 0.1 ) { sum = sum + d; } The program has a syntax error because the semicolons in the for loop are in the wrong place. The program has a syntax error …

Member Avatar for Priyanka_9
0
229
Member Avatar for divinity02

I have one question, when you want to add a game round in a java game, how do you do it, do you use the round().method or do you simply put (round++) + 1?

Member Avatar for JamesCherrill
0
361
Member Avatar for moaz.amin.37

hello!I install tomcat server and set CLASSPATH variable `servlet-api` and my servlets running properly but when i compile and run my old program program of `java 2 SE` then it compile successfully but not run it prints an error message G:\Java>javac BinarySearchDemo.java G:\Java>java BinarySearchDemo Error: Could not find or load …

Member Avatar for JamesCherrill
0
230
Member Avatar for Shawn_5

Scanner input = new Scanner(System.in); String secretWord ; String guess, dash = "-", upWord; int numGuesses = 0; int numWord; final String SENTINEL = "!"; System.out.println("Player 2, please look away. Player 1, please enter the secter word: \n"); secretWord = input.next().toUpperCase().trim(); numWord = secretWord.length(); for(int dashNum = 1; dashNum < …

Member Avatar for cool_zephyr
0
148
Member Avatar for My_1

Hello, I have problem with jbotton. I have botton decalre it. but how do i access it ? because I have 10X10 or 100 botton. let i want to access 95 botton how can i do that? how do i set the title? here is code import java.awt.*; import javax.swing.*; …

Member Avatar for JamesCherrill
0
300

The End.