32,199 Topics
| |
I received the error "possible loss of precision" on the last line of my code. Is it not possible to return a double? My instructions were to create a program, called power, that took a double (x) and raised it to an integer (n) power. [CODE] package power; /** * … | |
[LIST=1] [CODE] System.out.print("Enter the letter(t or z): "); B]letter = keyboard.next();[/B] if (letter == 't'||letter == 'T') { System.out.println("True"); } else if (letter == 'z'|| letter == 'Z') { System.out.println("False"); } [/CODE] Im getting an error here in bold, what is the problem?? | |
Ok so I have to write a reverse method of a stack and I am not quite sure how to do it. I understand that i need to pop the strings from one stack into another but whenever I try to do this errors arise. Specifically it says it cannot … | |
When i try to complile it says SlotMachineReel.java:175: missing return statement I think its because all my returns are in "if" statements and it needs a default return. line 128 & line 175 Thanks in advance for any help [CODE]/** * Constructs a new reel with its current face randomly … | |
I would like to sort a list (from a text file "sales.txt")that has text, int and float values. The problem I have is, my output only produces the last set of values. I would like to produce a table with as the final output. Please help me. [CODE]public class Sales … | |
So I need to write test cases for a problem with multiplying, dividing, adding, & subtracting fractions but I just can't quite seem to get it correct that it works. Here is part of the test file [CODE]//Multiply if (f1.multiply(f2) == (-2/15)) { System.out.println("test multiply: passed"); } else { System.out.println("test … | |
Hi everyone, I want to disable windows key in keyboard.Please let me know if u hav any idea. | |
Hi friends ...... I am doing a priject based on face recognation in java .... If anybody knows about it please help me....my doubts are:- 1-how can i read inage from a web cam ? 2-give a best and latest algorithm for comparingtwo images Anyway thanks in advance...May GOD bless … | |
hey guys, i am looking for source code as simple as possible that would be able to represent the shape of the human body in 3d (it could be almost stick man like or preferably something like this [url]http://www.3dlinks.com/oldsite/tutorials/GENERAL/chapter6_1.cfm[/url]) i would like to use for further development such as a … | |
Project 1 Project 1: Moving Objects Objectives Upon Completion of this project, students will be able to : Implement small classes that conform to a set specification. Use multiple classes together to solve a larger problem. Use logic to enforce a valid internal state and perform computations. Description The purpose … | |
I have so much trouble with this questions not only questions I want to study big o and time complexity but until now I didn’t found any good sit that explained it so could anyone help me by proved some sits about big o and time complexity and I really … | |
There are already 2 checkboxes to change to bold and italic. Now I want to make four radio buttons to change the font of the saying "say it with style!". Below is my code. [CODE]//******************************************************************** // StyleOptionsPanel.java Author: Lewis/Loftus // // Demonstrates the use of check boxes. //******************************************************************** import javax.swing.*; … | |
When I tried to compile this code, it has one error says ThreadsDemo.java:37: 'else' without 'if' else { ^ I don't know what's wrong with that exactly? [CODE]import java.util.*; class A extends Thread { private static int counter=0; private final int id=++counter; A() { start(); } public void run() { … | |
Hi there, In the code below my ImageIcon isn't showing when I run the program. I always struggle with adding Images in my GUIs and it's irritating. Is there some all important rule that I should know or something? [CODE] //Create window Components JLabel lblrequest = new JLabel("Enter amount of … | |
I am developing a java application that should run entirely from a CD. I should not install anything on the machine but now I am in need of a database. Is there any DB that I could use to sort out my problem? Thank you. | |
Hi Guys I require a Java applet (and web service on server) permitting upload of large files to the server. Client side: The applet UI should simply permit selection of a file for upload from the local directory structure. The server URL will be hard-coded in the applet. When the … | |
Hi there. I am currently trying programme my code[COLOR="Red"](P)[/COLOR] to lookup a hashtable from another class[COLOR="Green"](F)[/COLOR]. IS that possible? Given that the hashtable is in the main method of [COLOR="Green"](F)[/COLOR]. Should I apply a toString() in [COLOR="Green"](F)[/COLOR] and make it a String variable before I call it into[COLOR="Red"](P)[/COLOR]? If I … | |
I want to add sound in my Java program. I searched in Internet, and what I found was only how to add sound to java applet. Isn't there any way to insert sound into the desktop application java? Thanks in advance Regards, AG | |
How do [B][URL="http://www.improsys.com/importer.htm"]IMPROSYS[/URL][/B] use Contact Importer JAVA in a JSP page? <%@ page language="java" contentType="text/html" %> <% String user = request.getParameter("user"); %> <% String password = request.getParameter("password"); %> <% String parser = request.getParameter("parser"); %> <% String userId = "";%> <% if(user == null) user = ""; if(password == null) password … | |
hello.. i'm new and still learning netbeans.. i use netbeans as my mini project for my java course.. but here's what i dont understand.. i design using GUI.. i make black background... when i click on preview design.. everything seems ok and it look exactly like what i want.. but … | |
hi all, im fairly new to python and am struggling to find out how to read javascript values from a site. Help is much appreciated. thanks, Python01 | |
Hi all, I am having a problem with threads as demonstrated below: I have four very small and simple files. They are as follows: [CODE] 1) public class MainClass { private static SchedulerTest sch = null; public static void main(String[] args) { try{ sch = new SchedulerTest(); ThreadController tc = … | |
Ok so I'm brand new to programming and Java so go easy on me. The assignment is to take fractions and do all the operations to them, add, subtract, multiply, and divide. We are also required to do this with a test file and then the actual file. So far … | |
I am trying to start this java program using the requirements below, but I have no idea where to start. Just so you guys know, I am just starting out in this language. i have experience in Javascript programming, but this is completely different. I am used to Java programs … | |
So i am a college student and my assignment is to create a code that determines if an entered number is a palindrome or not. the assignment is as follows: "Write the following two methods: //Return the reversal of an integer, i.e. revers(456) returns 654 public static int reverse(int number) … | |
I created a little beginners program, and its about a Telephone network which has an operator and three clients: i made four classes, and it gives me error at planta and cliente In cliente it gives error on public class cliente private operadora Im Planta it gives me error in … | |
Hello, everyone! I have a really basic Triangle program that I have to make (no applets or Scanner, just calculating), but I have no idea of where to start. I'm supposed to compute the lengths of the sides, the angles, the perimeter, and the area. Right now, I'm stuck on … | |
Hey, this is my first post, and i'm a complete noob at Java. (i don't exactly know if i did the 'code tags' correctly, so if it didn't work properly, just know that I tried. my basic question is this: I'm trying to make a program that runs fullscreen on … | |
can someone help me write a java program that reads the inputted text and checks to see if any uppercase letters where used. |
The End.