36,051 Topics

Member Avatar for
Member Avatar for toldav

Hi, Someone please guide me to get the right sintax to print the numbers of above and below arrays. Right now it print the totals quantity, but what I really want is print each number for above an below array. Thanks. public class RandomArray { public static void main(String[] args) …

Member Avatar for toldav
0
148
Member Avatar for vegaseat
3
601
Member Avatar for anisha.silva

hi, i am trying to run the java EE application and when i clean and build the EJB and the web compoenent i get an error as below > Failed to execute goal on project account-web: Could not resolve dependencies for project edu.depaul.cdm.se:account-web:war:2.0.0: Failed to collect dependencies for [javax:javaee-web-api:jar:6.0 (provided), …

0
142
Member Avatar for michelleruth

I'm trying to use an array to print out 6 numbers out of 42 since it's a lotto code Here's the question the lecturer wants me to do: Write a Java program to achieve the following:  Declare an array of type int of size 6  Randomly generate your …

Member Avatar for radhakrishna.p
0
24K
Member Avatar for hazzag1995

Hey guys, i am developing an android app using Java, using eclipse on a windows PC. The building of the app started off very well, and we managed to get a working prototype working on a android phone using the USB debugging option. I have come across a big problem …

Member Avatar for peter_budo
0
464
Member Avatar for cham1829

I have a mysql database and Java application to access it. Now I need to access that programme via web.what can I do ? What are the new Java technology that I can use to get work done?I'm newbie to java and web. Please help me

Member Avatar for stultuske
0
68
Member Avatar for hg_fs2002

I want to store '\092' (which is backslash ASCII code) in a char variable but Java does not allow me. Does anyone know what the problem is and how I should store that?

Member Avatar for tux4life
0
132
Member Avatar for cisumma

systemFolder.targetFolders.dir=LoginInfo.getTargetFolderSystemDir() systemFolder.ser.dir=LoginInfo.getSystemFolderSystemDir() bookMarkDB.name=bookMarkDB.xml bookMarkDB.dir=bookMarkDB bookMarkDB.home=$(ViewResources.systemFolder.targetFolders.dir)+File.separator+$(ViewResources.bookMarkDB.dir)+File.separator+$(ViewResources.bookMarkDB.name); is it possible to concat bookMarkDB.home and bookMarkDB.name ? is the +File.separator going to work? thanks

0
107
Member Avatar for cisumma

Hello. Could someone translate this? I have yet to effectively use these expressions. sometimes I use the if statement to evaluate if a var has a certain value. most of the times it works. is the ternary expression used to handle other possibilities that could come up? 1 m != …

Member Avatar for deceptikon
0
165
Member Avatar for Violet_82

Hi I wonder if somebody can help me with this. This programs simulates throwing a die 20 times: import java.util.Random; // program uses class Random public class RandomIntegers { public static void main( String[] args ) { Random randomNumbers = new Random(); // random number generator int face; // stores …

Member Avatar for Violet_82
0
532
Member Avatar for sk8ergirl

Hi .. I need topic for my java project and I need to use inheritance in the project I'm thinking of book store or employees , nut how can I use inheritance in book store or employees what class will I inherit from

Member Avatar for ruchi18
1
122
Member Avatar for Petranilla
Member Avatar for emmas4impact

Hello, I am writing a chat server application in eclipse ide how i wish to change the jar default image icon but all attempt end either in error or the line of code running with change the icon. here is where i put the code. setIconImage(new ImageIcon(ClassLoader.getSystemResource("chatbutton.jpg")).getImage()); and here is …

Member Avatar for softswing
0
345
Member Avatar for pri.chakraborty

Hi all.. I m a begginer in java... i want to write a series like 1 to the power 2, 2 to the power 3 as so on... i can print its value only line 1 , 8 , 81... but i cant write the series where all to the …

Member Avatar for radhakrishna.p
0
4K
Member Avatar for requimrar

Hi guys. First of all, I am aware that there is a somewhat similar thread over here. However, it was never really answered and the code given was obscure (I don't like copying stuff anyway) Either way... I want to balance a chemical equation. However, I don't need help on …

Member Avatar for bguild
0
1K
Member Avatar for xavier.diazsanchez

This keeps popping up http://sidetrack1.deviantart.com/art/Javadocs-Not-Generated-353650496?ga_submit_new=10%253A1360562461 Here's the code for the things that need javadocs import java.util.Scanner; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author ufe-c122-pc05 */ public class Lab2 { /** * @param args the …

Member Avatar for stultuske
0
117
Member Avatar for bguild

*Code Complete* is a programming book by Steve McConnell which includes a second about how to choose a language for your project. It very briefly examines a wide variety of languages: Ada, Assembly, C, C++, C#, Cobol, Fortran, Java, JavaScript, PHP, Perl, Python, Smalltalk, SQL, and Visual Basic. It also …

Member Avatar for <M/>
1
233
Member Avatar for djcrab

Hello. I'm hoping someone will be willing to help me out. I'm pretty much done except for one part I've been scratching my head over. I'm sure this headache I have is not helping. Below are the instructions and the code for my problem area. Output the sum of all …

Member Avatar for djcrab
0
248
Member Avatar for supertechnewbie

I tried to make a try-catch block in a program but when an exception occurs, it doesn't do what I intended int num = 0; boolean noException; Scanner keyboard = new Scanner(System.in); while (true) { noException = true; System.out.print("Enter a number or 0 to exit: "); try { num = …

Member Avatar for tux4life
0
149
Member Avatar for StefanRafa0

anyone know how to split the text in txt file i have this... try { String newaccount = NewAccount.getText(); String newaccusername = NewAccUsername.getText(); String newaccpassword = NewAccPassword.getText(); FileWriter filewriter = new FileWriter(newaccount + ".txt"); BufferedWriter out = new BufferedWriter(filewriter); out.write(newaccpassword); out.write(newaccusername); //out.write(newAccount); out.close(); LabelInfo.setText("Account Registered !"); } catch (Exception ex) …

Member Avatar for stultuske
0
205
Member Avatar for StefanRafa0

Every time when trying to build gives me this "The project does not have a build script." what to do ??? :/

Member Avatar for stultuske
0
72
Member Avatar for gsfdg

Please help. I have an illegal start of expression at line 65 where it says "public static void p(Object...args)" /* * To change this template, choose Tools | Templates * and open the template in the editor. */ import java.io.*; /** * * @author Minh */ public class Dna { …

Member Avatar for stultuske
0
233
Member Avatar for iamthwee

Does anyone have a sample fully working code, that demonstrates how to change the mouse cursor picture when moved over a certain area in a program? [edit] just to clarify change it to a mouse cursor I designed myself[/edit] ThanQ

Member Avatar for maquaree
0
623
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
680
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
937
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
277
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
256
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
248
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
190
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
168
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
119
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
87
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
132
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
126
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
1K
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
153
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
138
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
113
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
261
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
233
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
457
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
197
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
212
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
181
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
283
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
171

The End.