36,051 Topics

Member Avatar for
Member Avatar for intes77

Im abit confused about the problem im solving right now. it says that i will create a program that would let me input any word, and count how many letters are there. and afterwards i will also make another statement letting me input any letter,then the program would determine if …

Member Avatar for BestJewSinceJC
0
179
Member Avatar for Conielo

Hello, I am a complete beginner at Java and I'm having a problem with something I don't understand at all. I'm trying to complete some homework in which I need to finnish off writing a small program which reads a text file and checks brackets in the file. Basically, it …

Member Avatar for Conielo
0
166
Member Avatar for NinjaLink

Hi, I'm having trouble getting age 10 occurrences and then removing age 10 from the list. Then I want to be able to print the list without displaying age 10 in it. I trying to use my bag class implementation to do this successfully. My bag class is below. Any …

Member Avatar for IsharaComix
0
159
Member Avatar for mimsc

Hello..Im trying to read the HTML from a URL and I threw in yahoo.com as a test...for some reason, "n.readLine()" is coming back as NULL and the while loop fails...and ideas?? thanx [code] <%@ page import="java.io.*" %> <%@ page import="java.net.*" %> <%@ page language="java" %> <%@ page import="trader.webservices.util.Utils" %> <%@ …

Member Avatar for kk4real
-1
109
Member Avatar for supersoup

If you are writing a switch statement that takes in a scanner type, how do you prevent a runtime error if a string or char is entered. [CODE]Scanner s = new Scanner(System.in); int a; a = s.nextInt(); switch(a){ }[/CODE] So if i ran the code and entered "abc" then i …

Member Avatar for BestJewSinceJC
0
117
Member Avatar for motress

TYPE=WIFI|TIME=1263867778390|ID=00:24:c3:31:2b:e0|NAME=csusm|RSSI=-93|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:12:17:7b:33:04|NAME=csusm|RSSI=-80|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:1f:27:55:f7:70|NAME=USMHotspot|RSSI=-70|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:1e:13:ee:3e:40|NAME=USMHotspot|RSSI=-85|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:24:c3:31:b8:80|NAME=csusm|RSSI=-91|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:90:4c:60:04:02|NAME=csusm|RSSI=-94|WEP=true|INFR=true TYPE=WIFI|TIME=1263867778390|ID=00:1b:0d:d6:6d:50|NAME=USMHotspot|RSSI=-70|WEP=true|INFR=true The above is a part of my log file. The problem i faced is how to just get ID with its particular RSSI value ? Because i want to calculate the average RSSI value for each different ID . I tried split.string, delimiter, …

Member Avatar for BestJewSinceJC
0
200
Member Avatar for smokin745

Ok now suppose i have some code and there is a point where the user is asked to input some value into showInputDialog...and then the user must input a String value, but if the user inputs an integer value, the program crashes...please help me and explain me how can i …

Member Avatar for Cort3z
0
174
Member Avatar for kvass

Hey everyone! If I have a matrix as follows: int[][] mat = new int[5][3]; Does that mean that the row size is 5 and the column size is 3 or vice-versa? I am really confused about whether the order is [row][col] or whether it is [x][y] in relation to the …

Member Avatar for masijade
0
116
Member Avatar for manikandan_dani

hi, I am developing web application using jsf2.0. In this case, I used rich:dataTable tag for display the values from mysql. so this is working.. my problem is, How to select the perticular row or index from the datatable for another processing... help me.. Thanks.

0
69
Member Avatar for Emmett_1981

Hi everyone, I am using the Struts 1 framework to develop a web application for my FYP. So far I have been able to access the properties file from all jsp in my application with example such as the following code. [CODE]<bean:message key="welcome.title"/>[/CODE] I want to have the entire web …

0
173
Member Avatar for Destiny1

Hello, everyone. I'm at the moment doing a homework assignment involving static methods and arrays. It consists of the following instructions. I'm to create a class known as ArrayStatisticsMethods and in this class, there are definitions to four different "public static" methods which will be described. I'm provided the use …

Member Avatar for mkurdukar
0
506
Member Avatar for Accendo

Hey there guys, first post here :). The problem I have is regarding 2D arrays ofcourse. So I have a .dat file that is 1000x1000 in size, I then need to find what the [B]int[/B] is given a specific x,y co-ordinate. I scarcely know arrays and have no idea on …

Member Avatar for javaAddict
0
141
Member Avatar for rena0514

in this program i have to use listners, and radio buttons and buttons....right now i am doing the first part of the program where when the user selects the radio button for circle two circles appear on the screen..... [code] import javax.swing.JFrame; public class shapes { public static void main(String[] …

Member Avatar for javaAddict
0
155
Member Avatar for iamsmooth

So I'm redirecting my print outputs to a stream, which becomes a char array. Then, when I use Junit, I use .toString() on the char array to make it become a long string. However, when I compare the string with the exact string that it should be, it says they …

Member Avatar for masijade
0
99
Member Avatar for Olliepop

Hey guys! Would some kind soul please be able to tell me how i can add some form of text field (for user input) which can be positioned anywhere easily with X and Y values and has no border (or the border is removable).. I've seen it many many many …

Member Avatar for Olliepop
0
141
Member Avatar for KirkPatrick

I have a program where my JFrame contains a tabbed pane with 3 tabs, I am wanting to make it so that when tab1/jpanel1 is doubled clicked it displays the contents of the JPanel on the second monitor. In my case the second monitor will be a large plasma screen …

Member Avatar for KirkPatrick
0
3K
Member Avatar for SasseMan

Hi, Im writing a java app that uses hibernate for DB stuff. The thing is that it takes some time to start hibernate, and I would like to have a progress bar to show the loading procedure, and maybe print what hibernate is outputting [code] public class HibernateUtil { private …

0
80
Member Avatar for the_prox

Hi there, I'm working on a simple java program that allows a user to input numbers via console, throws an exception when a string is entered, and tallys up and prints the integers when the user simply hits enter with no input. i.e. Please enter a value: 5 Please enter …

Member Avatar for Estudiante
0
13K
Member Avatar for Alpdog14

I have this hashCode function that I have been trying to implement with Eclipse but my Tests keep failing. I am trying to write a Hashcode function that returns that last 2 or 3 chars of a word or number. Here is my current code: [CODE]public int hashCode(String value){ String …

Member Avatar for BestJewSinceJC
0
205
Member Avatar for Merosansar

if(mail.equals(usermail) && date1.equals(date) && title1.equals(title)) { System.out.println("record is matched"); returnFlag = true; break; } the if statement is not executing even though all the strings are equals.

Member Avatar for ad_rulz
0
135
Member Avatar for Peppermaud

Here is the Homework question... This is another project involving static methods and arrays. Once again, static methods are covered in the text in Chapter 5. Methods with arrays as parameters are covered in Chapter 6 sections 4 and 5. (This applies to editions 6 and 7.) 1. Write a …

Member Avatar for stultuske
0
152
Member Avatar for amit.hak50

Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height. In this I am not getting is that how we can store binary tree as an array.

Member Avatar for BestJewSinceJC
0
120
Member Avatar for lightninghockey

I was instructed in class to do the following.... The Programming Example: Calculator in Chapter 12 is designed to do operations on integers. Write a similar program that can be used to do operations on decimal numbers. (Note: If division by zero occurs with values of the int data type, …

Member Avatar for javaAddict
0
5K
Member Avatar for denni2727

Well, my problem is that i have to print some text in a dot matrix printer with a 8.5in width x 6.5in height page. At first, I change the paper size of the printer in the server properties from windows and it fixed the problem but now i need to …

0
145
Member Avatar for ontherocks

Below is my code. I am not sure why am I getting the error "[COLOR="Red"]javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "lcc" is not defined.......[/COLOR]" [CODE]import java.io.BufferedReader; import java.io.InputStreamReader; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class Eval { public static void main (String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine …

Member Avatar for ontherocks
0
115
Member Avatar for gedas

hey guys, i have a simple code that simply asks the user to input a number a number and than where you press you mouse it draws a circle you can draw as many circles as you have specified in the beginning of the app. well there is also a …

Member Avatar for skwatamkar
0
104
Member Avatar for skwatamkar

hello friend this is the code of my splash screen i want to play a background music when this screen is appears who can i do that i have "hbd.au" file.which i want to play at back ground.I also want to stop the music when it end i.e recursive playback …

Member Avatar for skwatamkar
0
140
Member Avatar for mandeep.garg19

If a class does not extend any class and implements one interface, how many types this class has?

Member Avatar for jwenting
0
43
Member Avatar for vvrekha

Hi All, In my jsp page, I am getting the data from Ms-sql for 3 combos.first 2 combos are independent, like course,location. either i can select course or location in 3rd combo i need to display the name of student. I was not able to pass the two combo values …

Member Avatar for peter_budo
0
79
Member Avatar for mayann

H All, I am trying to create a login application using servlets and using sessions for storing the login info. the login info is stored in a hashmap. as the server restarts, the info is lost. So i m trying to write this info in Temp file. So that the …

Member Avatar for jwenting
0
146
Member Avatar for pinansonoyon

Hello, everybody! Please, look at this picture! You see IE and HttpWatch Basic plugin loading yahoo.com. You see a range of any http responses. But the most important is the list of loaded images. Some of them are loaded during JavaScript scripts executing, some of them are loaded during AJAX …

Member Avatar for jwenting
0
72
Member Avatar for Olliepop

Hey daniweb! I have a really serious issue in my program right now. I'll explain how this piece works: -The server sends a ping -The client replies with a pong and starts a timer -Server sends pong back and the client checks how long it took to receive the second …

Member Avatar for Olliepop
0
155
Member Avatar for collinsislee

i missed lecture today and this is what they did in class. im not sure how to complete this. hope you all can help me out. [code] class Clock { // Declare fields of the class // 0 <= hours < 24, 0 <= minutes < 60, 0 <= seconds …

Member Avatar for BestJewSinceJC
0
255
Member Avatar for beiko

im a beginner in Java and I need the user to input a year month and day and then put it in the form of yyyy-mm-dd using the Date class but I keep getting the "week day, month, date, time, year" this is part of the code [CODE]Scanner input = …

Member Avatar for PatrickSharp
0
113
Member Avatar for jpavao

Hi, If I have a class, defined in UML, that can contain itself (0 or more times) and if that class is a JPanel how would I implement it without the "Illegal Argument" runtime error? please see the attach file for a uml class diagram. Can anyone help me? Thanks.

Member Avatar for jpavao
0
170
Member Avatar for Tlaloc

I have made an array of class cards which is a 4*14 grid (The 14th space is for the 4 grey non-cards). So far i have made 2 methods for this. The first was an algorithm for figuring out where each card belongs which I painted on when they were …

0
75
Member Avatar for Emmett_1981

I have created a simple JTable with 5 columns, I need to perform validation on the column entries. I have used the getValueAt ( col, row) function to get the values from the columns. For the first four columns this works without fail but for some reason the last column …

Member Avatar for Emmett_1981
0
635
Member Avatar for smokin745

Hello guys, i m working on a program that stores details of a book collection. Following are the things that should be there: [CODE]• Write a new class ‘book’ to represent details of special book objects. A book consists of (for example) the title, number of copies, author, (“The Davinci …

Member Avatar for BestJewSinceJC
0
164
Member Avatar for tabs

In the following snippet .. i hav connected an excel sheet through jdbc jdbc excel driver. i am having two columns in excel sheet naming X and Y. the values of columns r stored in resultSet rs. then i m printing those columns values. in the method " public ArrayList …

Member Avatar for BestJewSinceJC
0
93
Member Avatar for tinamenon

public class OurList <E> implements OurListInterface <E> { // I. Local classes: // PURPOSE: To hold one data element in the linked list. class Node <E> { // I. Private member vars: E item; Node next; Node prev; // II. Constructor(s): Node (E newItem) { item = newItem; next = …

Member Avatar for Ezzaral
0
153
Member Avatar for TheWhite

[CODE]new File("config.ini");[/CODE] 1. When used via eclipse, the correct file is found in the root of the project. 2. When used via a runnable jar, it looks in C:\users\ME\config.ini How do I make it look at the file outside of the jar? New Folder: - program.jar - config.ini

Member Avatar for Ezzaral
0
172
Member Avatar for houlahan

ok so my original code was: [CODE] Patient patient = new Patient(); patient.setId(1); patient.setName("luke"); patient.setAddress("100 test"); patient.setTelNumber("01484710204"); patient.healthproblem.setBrainProblemName("Brain Cancer"); patient.healthproblem.setDateDiagnosed("30-03-1990"); patient.healthproblem.setPatientHealth("Poor"); Patient patient1 = new Patient(); patient1.setId(2); patient1.setName("john"); patient1.setAddress("100 test"); patient1.setTelNumber("01484710204"); patient1.healthproblem.setLungProblemName("Lung Cancer"); patient1.healthproblem.setDateDiagnosed("12-02-1991"); patient1.healthproblem.setPatientHealth("Poor"); patient1.healthproblem.setLungProblemSide("Left"); if ("luke".equalsIgnoreCase(patient.getName())) { out.writeObject(patient); } else if ("john".equalsIgnoreCase(patient.getName())) { out.writeObject(patient1); }[/CODE] so when the …

Member Avatar for houlahan
0
97
Member Avatar for Egypt Pharaoh

Is swich can take string parameter yes or no like [CODE] string s="Mo"; swich(s) { case "sa ": break ; case "jv": break; default : break: } [/CODE]

Member Avatar for gangsta1903
-1
131
Member Avatar for aladar04

The program should tell user how many vowels occured on each word in a given string. The string was "Once upon a midnight dreary, while I pondered weak and weary." The output generated by the codes below was: [COLOR="Green"]Enter string(s): Once upon a midnight dreary, while I pondered weak and …

Member Avatar for gangsta1903
0
120
Member Avatar for Alex_

Hello, i want to understand these methods as a programmer. The only difference i know is that "get" sends the parameters via the url while "post" does not. But what actually happens in the source code? How can i implement it? I found some source code concerning the post method …

Member Avatar for jwenting
0
198
Member Avatar for manikandan_dani

hi, I am developing web application. In this case, I wish to find the client side operating system using java(without javascript) . How to find. Please tell me... Thanks.

Member Avatar for jwenting
0
125
Member Avatar for bkafroboy69

need some help. just wanted to know if my code is right can some one read over these instuctions and tell me if my code is right like the directions public boolean add(double value) If the size of the array is less than its capacity, then the value is added …

Member Avatar for stevelg
0
170
Member Avatar for solomon_13000

The code below will throw a RuntimeException which will be caught by the first catch block that handles the RuntimeException. Then why is it that the second catch block is attempting to handle the RuntimeException. Is it because a RuntimeException and an ArithmeticException are both unchecked exception?. [CODE] public class …

Member Avatar for masijade
0
119
Member Avatar for shredded

how do i write a java code preferably using the 'while-do', 'if-else', 'for' statements to get these outcomes? n is the input and the system prints triangles of height n? n=2 . * *** n=5 ........* ......*** ....***** ..******* ********* ignore the dots, they are to align them properly thanks …

Member Avatar for javaAddict
0
777
Member Avatar for xellos

whats the best way to make gui programs write all code your self or use the gui creator from netbeans? dont you get crappy code from the creator ?

Member Avatar for jwenting
0
137

The End.