35,618 Topics

Member Avatar for
Member Avatar for deecy1

Assuming a one dimensional integer array a[] has been declared and created with 100 elements: for (int i = 0; i<=a.length; i++); a[i] = 5; Assuming int b [] [] = new int [3] [3]; b[1, 1] = 5; Strings students[] = {Pat, Tom, Mary, Anne};

Member Avatar for javaAddict
0
94
Member Avatar for musthafa.aj

Hi! i creating java apps to edit windows registry .... it is fine in Xp but in Vista its need admin privileges.. how do get it programmatic-ally... in .net app.manifest is there..but in java anything is for admin privil..

Member Avatar for masijade
0
90
Member Avatar for VinceAshbySmith

Hi all is it possible to delete the last line of a text file each time a method is called. I have the following method: [CODE] Writer output = null; File file = new File("playerData.xml"); try { output = new BufferedWriter(new FileWriter(file, true)); output.write("\t" + "<player>" + "\n"); output.write("\t" + …

Member Avatar for masijade
0
3K
Member Avatar for sulthana

input a number and convert it into binary, octal and hexadecimal using built in methods of integer class

Member Avatar for javaAddict
-1
147
Member Avatar for rukshilag

Please help. i do not know how to do this as i am a java beginner. i only know to use a string and output. how do i do this with a loop? this shows to the side bit it should be in the middle.... like an upside down A …

Member Avatar for gunjannigam
0
76
Member Avatar for onsir

I want to get data sales item, its with compare table item with table sale although item in table sale nothing, data will show according with data item i have SQL like this [code] select i.code,s.date_sale from Item i left join(select * from Sale where date_sale <='2009-01-31') s on i.code=s.code; …

Member Avatar for masijade
0
85
Member Avatar for ravikiran032

i have written the following code and it is not executing due to the following [B]error[/B] [COLOR="Red"]dec.java:7:integer number is too large :10000000000[/COLOR] [U][B]code[/B] [/U][CODE] import java.util.*; class dec{ public static void main(String args[]){ long dig,store,use,temp,temp1,end; int count=0,count1=0,ch; use=1000000000; end=10000000000; while(use<end){ dig=use; for(int i=0;i<10;i++){ temp=dig%10; dig=dig/10; ch=(10-i)%10; store=use; for(int k=0;k<10;k++){ temp1=store%10; …

Member Avatar for masijade
0
2K
Member Avatar for Xamas

I'm going to put the text information to "data.bin" file in binary mode. Then i'm goint to read that information from file. I did by using "FileOutputStream", then "ObjectOutputStream" class and his "writeObject();" method, but this one just puts serialized object data to file, and as I understand - that's …

Member Avatar for javaAddict
0
156
Member Avatar for softswing

Hai Friends, What is Swingworker class? were we can use this class? what its advantage? can any one explain this....

Member Avatar for softswing
0
121
Member Avatar for cam875

I am having a problem with my code which handles whether or not the client has disconnected this is the run method for each thread. The code gives me an error, something about the nested catch block not ever happening or something. I didn't understand. Thanks for any help. I …

Member Avatar for mellowmike
0
97
Member Avatar for JasonDoyle

to declare and populate my array i am using [CODE] //declare Image pictures[][] = new Image[16][14]; public void init(){ //populate pictures[2][0] = getImage(getCodeBase(),"twohearths.png"); pictures[3][0] = getImage(getCodeBase(),"threehearths.png"); pictures[4][0] = getImage(getCodeBase(),"fourhearths.png"); pictures[5][0] = getImage(getCodeBase(),"fivehearths.png"); pictures[6][0] = getImage(getCodeBase(),"sixhearths.png"); pictures[7][0] = getImage(getCodeBase(),"sevenhearths.png"); pictures[8][0] = getImage(getCodeBase(),"eighthearths.png"); pictures[9][0] = getImage(getCodeBase(),"ninehearths.png"); pictures[10][0] = getImage(getCodeBase(),"tenhearths.png"); pictures[11][0] = getImage(getCodeBase(),"jackhearths.png"); …

Member Avatar for JasonDoyle
0
157
Member Avatar for ceyesuma

The name of this question jstl_var_message Hello and Thank you in advance for any assistance. [B] System info: [/B] Netbeans, JSF, glassfish [B] The Purpose of this post is: [/B] To set a variable to use to map the stylesheet.css to messages [B] The functionality of this code is: [/B] …

Member Avatar for ceyesuma
0
1K
Member Avatar for rimorin

Hey techFriends, I was wondering since JSTL ( Java Standard Tag Library ) main purpose is to only make your logic more readable, what are the real benefits of using such technology in my Java server pages? From what I have seen in the Java Server Tag Library document, seems …

Member Avatar for ~s.o.s~
0
107
Member Avatar for Cort3z

Hi. I'm working on a encryption thing. For it to run properly i need jsp to be able to handle big integer numbers (10^15 and higher). The long variable gets me to about 10^9, but that is not enough. I cant seem to find a way to force jsp to …

Member Avatar for ~s.o.s~
0
68
Member Avatar for Phaelax

I need a method of rendering HTML in Java. I was originally planning to use [URL="http://www.genuitec.com/about/labs-webkit-for-swt/WebKit%20For%20SWT%20Developer%20Guide.html"]WebKit for SWT[/URL], but I'm having problems with it displaying images as specified in the CSS. Most examples I've seen have worked fine when loading an external html file, even the package mentioned above. My …

Member Avatar for ~s.o.s~
0
136
Member Avatar for dsmush

Hi I'm doing a project which requires a registration/login page. I have created both registration and login html pages and have done the validation servlet for the login page. I've also attempted the validation servlet for the registration page, but this is where I am struggling because I can't get …

Member Avatar for javaAddict
0
504
Member Avatar for big noob

installing java on my firefox explorer get right to the end of the installation and it gives me an error message saying "error 25099. unzipping core files failed" doesnt allow me to do please help as my name says im a big noob when it comes to pc shit.

Member Avatar for daslocu
0
132
Member Avatar for RichardCrickets

Hello DaniWeb. Here is my problem. I have an XML file that is arranged like this.. <document> <Word>apple</Word> <Word>hat</Word> <Word>car</Word> </document> I'm trying to figure out how to grab the actual words. This is how I'm doing it now. [Code] DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(new File("data/general/words.xml")); NodeList …

Member Avatar for RichardCrickets
0
105
Member Avatar for rizzo18

I'm trying to execute this code to open a java GUI to run queries on the oracle express database I have set up but at the actionPerformed() class, I keep getting java.sql.SQLException errors. What I would like for it to do is when you hit the button, that table from …

Member Avatar for rizzo18
0
2K
Member Avatar for emcee123

Guys a little help please. I already finished my program, I just need enter codes in order for the user to simulate the program again using loop. How do you do that?

Member Avatar for stevelg
0
79
Member Avatar for vishva ransika
Member Avatar for craaazy123
-1
81
Member Avatar for Phaelax

I've played around with HTMLEditorKit and HTMLDocument, and while I've managed to do the parsing I needed, I also need the complete source code of the document to pass along to a webkit renderer. Java's existing document throws out some tags after I read it in. [code] HTMLEditorKit kit = …

Member Avatar for Phaelax
0
112
Member Avatar for P00dle

I am using the netbeans gui builder. I dragged a filechooser onto my frame, and it does almost everything I want it to do. How do I remove the buttons? I dont need them - the user just has to select a file, or type in a file name, the …

Member Avatar for P00dle
0
57
Member Avatar for Merosansar

I am going through the java basic. I need some simple sample programme using the concept of class and interface with description.

Member Avatar for masijade
0
58
Member Avatar for JBeginer7891

Hi members! Sorry I need a help with this snippet. I am still workin' on it... the thing is all the three buttons ain't working. And Can anyone tell how to compare the values of username and password against a database in Ms access. Thanks Here is my code import …

Member Avatar for JBeginer7891
0
600
Member Avatar for adcodingmaster

hi All i have a question. plz answer if u can. i must b very thankful to u question is Why use abstract classes at all? Why not just declare a class and then make sure you never instantiate any variables of that type? thnx in advance

Member Avatar for ~s.o.s~
0
92
Member Avatar for lloydsbackyard

import javax.swing.*; import java.awt.*; public class sample { public static final int width=500; public static final int height=500; public static void main(String[] args) { JFrame mywindow=new JFrame(); myWindow.setSize(Width, height); JLabel myLabel= new JLabel ("How do i insert picture in this window? I want to create a photo gallery on this …

Member Avatar for vjmir
0
90
Member Avatar for sree22_happy

Hi friends, I am facing a problem with Signed jar file. I have two jar files.One contains applet class and other jar file contains supportive classes used by that applet.I was able to self sign the applet jar file let name it as "ScreenApplet.jar" using jarsigner tool. The supportive jar …

0
119
Member Avatar for devnar

Hi, I'm trying to call a bunch of methods during run-time using reflection, but I'm getting an exception saying "IllegalArgumentException: wrong number of arguments". Here's some information on the variables used. - All elements of mailTestClass[] are classes that extend AbstractTestCase. (FirstTestCase extends AbstractTestCase and FirstTestCase.class is the first element …

Member Avatar for devnar
0
966
Member Avatar for Clawsy

Hello, I built a chat application that uses sockets and TCP/IP protocol. The client is an applet. The problem is I cannot connect the applet client with the desktop server application. [I]If I run the applet inside the applet viewer in NetBeans it works perfectly[/I]. I even tried the applet …

Member Avatar for Phaelax
0
154

The End.