32,199 Topics

Member Avatar for
Member Avatar for hg_fs2002

I am trying to use such a hexadecimal floating constant "0x0.DAB789B" in java but it gives me java.lang.NumberFormatException. How can I convert hexadecimal float constant to decimal? I know how to convert hexadecimal **int** constant but that does not work for float constant.

Member Avatar for tux4life
2
676
Member Avatar for mehmud

Implement in Java a class Coin that describes a coin with a name (e.g. dime) and a value (e.g. 10 cents). Also implement a class Wallet that describes a collection of coins. Supply a method add() to add a coin to a purse, and a method printContent() that prints out …

Member Avatar for tux4life
0
929
Member Avatar for LOI_SE

I'm writing a VB.NET software application in which I want to plot some placemarks on a google map which is in a webbrowser control in the application. weburl = applicationpath & "/googlemaps.html" WebBrowser1.Navigate(weburl) To accomplish this I call a javascript function from VB.net in this button event: Private Sub Button1_Click_1(ByVal …

Member Avatar for TnTinMN
1
1K
Member Avatar for efth

public class ClickListener implements ActionListener { public void actionPerformed(ActionEvent e) { System.out.println(e.getSource().setText("Changed")); } } Eclipse tells me that `setText()` is undefined for type Object. This tells me that `getSource()` doesn't actually return the JButton object. How do should I do this then? How I change the text of the clicked …

Member Avatar for efth
0
17K
Member Avatar for jalpesh_007

I have doubt that what we are using in java as String, is it class or datatype? String str = "hello" String s1 = new String("Hi") What is the difference in above two statements? Which is object of String class and which is varialble of datatype String? Because as i …

Member Avatar for jalpesh_007
0
270
Member Avatar for needhelp88

Hi all, I have created a java program that reads in the number of rows and columns entered by the user, and creates a board of that size. Then, it takes in the position of cells (x, y) that the user wants to make live on that board. -1 will …

Member Avatar for needhelp88
0
253
Member Avatar for Kewne

Hi,... I tried to run the code using the java emulator but it only provides one phone emulator at a time I couldn't see if it does pass the word, what I did is that I downloaded the sun wireless toolkit which can run multiple number of mobile emulator. I …

Member Avatar for Kewne
0
246
Member Avatar for aVar++

Hello I have made a simple program, but I have a problem with my IF...ELSE statement. Il explain under the code. Main Class: public class Learnt { //Main void in Learnt class public static void main(String args[]){ //Ask's user for name then prints it String AskForUsersName = "What is your …

Member Avatar for stultuske
0
186
Member Avatar for shishir365

import java.util.*; class nw { int dis(int p) { int c=0,flag=0; for(int j=1;j<=p;j++) { if(p%j==0) c++; } if(c==2) return 1; } void hui() { int c; int p,q; Scanner sc=new Scanner(System.in); System.out.println("range p"); p=sc.nextInt(); System.out.println("range q"); q=sc.nextInt(); for(int i=p;i<=q;i++) { c=dis(i); if(c==1) { System.out.println(i); }}}} {it says missing return statement! …

Member Avatar for stultuske
0
166
Member Avatar for sofien.fkih

How can I display a color in java with a certain color, Please help with an example.

Member Avatar for Ene Uran
0
114
Member Avatar for london-G

Hello, I would like to build my application which is interacting with my localhost database. In netbeans before I run the program I need to turn on Wamp and "Start all services" in order for the program to run properly. My question is, when the jar file is made, will …

0
86
Member Avatar for Violet_82

Hi there, I have to calculate the pithagorean triplets up to 500 (it's an exercise I found on the deitel and deitel book) and I got a little stuck, in that it looks like I am getting an infinite loop. The exercise says to use a triple for loop, but …

Member Avatar for Violet_82
0
129
Member Avatar for angel06

Hello guys I have a problem in resizing the image in my java program here is the code: import java.awt.*; import java.applet.*; public class sampleCaseStudy extends Applet { private Image MyImage; public void init() { MyImage = getImage(getDocumentBase(), "manginasalmo.jpg"); MyImage.getScaledInstance(700, 100, Image.SCALE_DEFAULT); } public void paint(Graphics g) { g.drawImage(MyImage, 0, …

Member Avatar for bguild
0
123
Member Avatar for vij123

Hello Sir, I have a simple Issue but It is not resolve by me i.e input parameter are not store in Ms-Access. I store the input parameter through Standard Action <jsp:useBean>. jsp:useBean call a property IssueData. this property exist in SimpleBean which create a connection from DB and insert the …

Member Avatar for mahe33
0
996
Member Avatar for noorjan

i have an image stored in the column( img) of mysql table albums. the format is blob. i do not no how to retreive it from the table and display it in a label img1 in my netbeans project. how do i write the resultset code and display it on …

Member Avatar for radhakrishna.p
0
149
Member Avatar for daxx

Recently got a new windows 8 laptop and having trouble using features in eclipse. For instance I can't connect to my local database, can't connect to the eclipse marketplace and even can't run JUnit tests! (Gives a could not connect to error) I believe there is something going wrong with …

Member Avatar for daxx
0
134
Member Avatar for javaid iqbal

public static int findMaxPosition(int n[]){ int i, maxPosition =0; for (i=1;i<n.length;i++) if (n[maxPosition]<n[i]) maxPosition=i; return maxPosition; }

Member Avatar for harinath_2007
-2
110
Member Avatar for pattmorter

Hey everyone, So i've been doing some reasearch and I can't seem to find the answer to my problem anywhere. It could also be that I don't really understand the articles I find in google but I figured I'd ask here since everyone is always so helpful. So for a …

Member Avatar for pattmorter
0
256
Member Avatar for vishalonne

Hi Everybody I tried and failed to display images of employees in jTable. I have a MySQL Table which have 4 fields - ID,Name.Phone,Photo(Blob data type). Now I am able to retrive data from this table and display it in JLabel with other data in JTextField, but How can I …

Member Avatar for stultuske
0
1K
Member Avatar for Kewne

is it going to be possible to have a connection if I create a J2ME (netbeans) as client and vb.net (2010) as the server?

Member Avatar for Kewne
0
226
Member Avatar for awfootball7

I keep getting an error in my MoneyDemo class, it reads, "Method checkMoney in class Money cannot be applied to given types; required: no arguments; found int, int; reason:actual and formal argument lists differ in length" Also here is my list of objectives for the program which I'll be graded …

Member Avatar for gon1387
0
450
Member Avatar for daryl_1201

public class JavaApplication1 { public static void main(String[] args) { for (int i = 5 < = 100; 1 + = 5){ System.out.print(i); if (i <100){ System.out.print(","); } } } }

Member Avatar for stultuske
0
228
Member Avatar for adikimicky

Can any one please tell me how to connect a simple java web application to Oracle10g Express edition? Which driver should I use? Thanks in advance.

Member Avatar for adikimicky
0
194
Member Avatar for VEL Hassan

I am in need of SDK ME development kit for creating Mobile applications using Netbeans IDE 7.1.1. Favour me in this regard. Velhassan.

Member Avatar for peter_budo
0
211
Member Avatar for bikashjit

java and j2me are same or what ? Can I make j2me app. After learning java ? If yes Suggest some good free website to learn java which gives complete a2z course ?

Member Avatar for peter_budo
0
180
Member Avatar for adikimicky

hello everyone.. I am trying to connect a simple application to Oracle XE database. But when I run this program , the else part of program is running. Can Anyone tell whether I hav ewritten the code correct or not. import java.sql.*; public class jbc { public static void main(String …

Member Avatar for radhakrishna.p
0
280
Member Avatar for 浩霖

I would like to create a font file (like .ttfv or etc) by using java, how can I do it. If java cannot create or edit font file, could you tell me which program language can do it? I would like do it by programming without exists software. I really …

Member Avatar for april88t
0
168
Member Avatar for sk8ergirl

I'm almost done with my assignement I've created 2 class and I have one format method in student class the file look like this (there are about 25 lines) courseNum courseName courseSemester studentID,studentProgram,studentGpa studentID,studentProgram,studentGpa the output should look like this courseNum courseName courseSemester studentID--studentProgram--studentGpa studentID--studentProgram--studentGpa I'm still not sure if …

Member Avatar for tux4life
0
240
Member Avatar for toldav

I just need help to display my initial value of 25000 when the loop runs and print the years. I need the year 1 to be the initial value without doing the percent first. Also my print format doesnot display the $ and the headers. Any guide to the right …

Member Avatar for toldav
0
172
Member Avatar for dicknballs

i am working on a program called myBalls. so far, heres what i have import java.util.Scanner; public class Penis { private int length; public Penis() {} public void setPenisLength(int l) { length = l; } public int penisLength() { return length; } } public class myBalls extends Penis{ public static …

Member Avatar for tux4life
0
555

The End.