36,051 Topics

Member Avatar for
Member Avatar for prem2

hi , I am new to java.Can anyone what is the different between the following code for the java String Declaration. [code] import java.io.*; import java.util.*; class Sample1 { public static void main(String args[])throws IOException { String str="First String"; String Str1=new String("Second String"); System.out.println("The variable is "+str); System.out.println("The variable is …

Member Avatar for ~s.o.s~
0
473
Member Avatar for soumya_mjmder

Hi..can anybody please explain to me how to implement the importNode method to import an element from an xml to another xml with an example.

Member Avatar for localp
0
53
Member Avatar for smoothe19

How do i write to a text file [B]WITHOUT[/B] deleting the current information in it? basically write on the next available line.

Member Avatar for localp
0
79
Member Avatar for Jay V.

I am at my wits end with this code. I've been working on it for at least 2 weeks and the same error appears. The error, itself, is the incompatible types error. It appears underneath the division symbol. [CODE]// DivideByFive.java - This program determines if a number is divisible by …

Member Avatar for kashokreddy14
0
151
Member Avatar for TejaDharma

Hi, I'm unable to change the date format in java. I'm given the code as follow. [CODE] java.util.Date date = new Date(); [/CODE] But it displays like july 17 13:01:43 GT 51:25 2010 But i need only this format july 17 13:01:43 2010 Can u pls help on this?

Member Avatar for TejaDharma
0
92
Member Avatar for aminit

Hellooo All : I want to start my final year project on VPN applications using Java , I'm still wondering what can an application I can create , so can anybody provide me any topic , Thx in advance

0
55
Member Avatar for hawynstud

Here is what I have so far: [code] package payrollpart2; /** * * @author Darryl */ import java.util.Scanner; public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner input = new Scanner(System.in); //declare program variables String employeeName; double hourlyRate; double …

Member Avatar for hawynstud
0
145
Member Avatar for w_van_heerden08

Hi guys, I'm a grade 11 I.T student and I need help.I have to create a networking application in Java,something like Mxit or Facebook, just a simpler version.I have no idea what to do and my teacher is too stuck-up to help me.All I have is a GUI.Can someone please …

Member Avatar for scrappedcola
0
134
Member Avatar for 1314abc

i try to compile and run seems like work perfectly but once i click the "add" button(something like save) error come out i dont know what problem with the codes [CODE]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* …

Member Avatar for Taywin
0
112
Member Avatar for Jayavardhan

Hi, I need to get the current date without using [B]any packages or any construction methods[/B]. Simply, i want to get the current date by convert date to string. I used this code. Please find the below code... [CODE] String getDate = new SimpleDateFormat("yyy/MM/dd HH:mm:ss"); return getDate.format(date); [/CODE] But, i'm …

Member Avatar for Jayavardhan
0
461
Member Avatar for paul ince

Hello, I am quite new to swing, and I was trying the JFrame component, when this exception occurred , just when I tried to instantiate the JFrame object. It says the following: [code=java] Exception in thread "main" java.lang.NullPointerException at JFrameDemo.main(JFrameDemo.java:8) [/code] and line 8 is the following [code=java] JFrame frame …

Member Avatar for Stefano Mtangoo
0
955
Member Avatar for ttboy04

How do I create a method header that takes a string as an argument and returns the characters in the argument as a set. Please only reply if you know the answer. Thanks. [CODE]public class Food { private TreeSet<String> myList = new TreeSet<String>(); public Food() { super(); myList = new …

Member Avatar for ttboy04
0
105
Member Avatar for chinee

i am trying to get the input the info so when the choices are chosen and submit is clicked the info is seen for the flower order but getting errors. if you read it you would probably get what i am trying to say but how to get it without …

Member Avatar for NormR1
0
317
Member Avatar for Victor C.

Good evening, I am having a little trouble with the outcome of my bucket list assignment. Everything seems to be working just fine, but the final outcome isn't up to par. When you enter numbers from 1-30 or 61-99 it goes into its proper place, however numbers enter in the …

Member Avatar for NormR1
0
176
Member Avatar for hypernova

Hi ! I want to get a jdbc DataSource through JNDI. I am rather new to JNDI, and I dont know servlets,etc. Whatever tutorials I find on the internet show how to do this using some server like tomcat, etc. I want to make a simple jdbc program in which …

Member Avatar for parry_kulk
0
123
Member Avatar for Teethous

Hey everyone I want to create a Map app of my community for mobile phones. Where should I start/

Member Avatar for peter_budo
0
76
Member Avatar for gunbuster363

I know the password. I want to crawl all the post of my gf's xanga down to my comp, for better reading. But my gf have set "require friend login" to see her post. So I need to login my id of xanga before reading her post. What I want …

Member Avatar for masijade
0
108
Member Avatar for theprogrammer19

Hi ALL =) hope all of u will be right I have been visiting this site constantly and I learned a lot from him, this is the first production in the Java language to me I hope that you like. this is my First Program in java language i hope …

Member Avatar for ~s.o.s~
0
210
Member Avatar for imag1ne

Hiya, I need to make a game for my cs class. My game is the word find game and it plays like this: You are given a long word like "antidisestablishmentarianism" and your goal is to find as many words in to word given as possible. My program will save …

Member Avatar for Taywin
0
189
Member Avatar for imag1ne

My objective is make a game program for my cs class. So my game is like this: You input a word and then input another word which starts from the last letter of the first word. The program check if the word has been used before and if the last …

Member Avatar for Taywin
0
148
Member Avatar for WargRider

Hey, well I have this problem, I am making a game in Java and it is getting really far. If anyone saw my last problem, that is resolved and I finished my networking code. Here is the problem, to start a new game window in my code, one would write …

Member Avatar for NormR1
0
104
Member Avatar for Swetham5236

I am trying to view the log file in netbeans, but when I click on View -> IDE log its not displaying anything. Please help

0
54
Member Avatar for seemant gupta
Member Avatar for theprogrammer19
0
127
Member Avatar for sadhawan

Hi guys i have java scripts as follows His acquaintance with Elizabeth was very trifling.&quot;</p>\n<P class=&quot;Sx0x1&quot;>&quot;To be sure, Lizzy,&quot; said her aunt, &quot;he is not so handsome as Wickham; or, rather, he has not Wickham's countenance, for his features are perfectly good. But how came you to tell me that …

Member Avatar for sadhawan
0
154
Member Avatar for soumya_mjmder

Hi guys..i have a XML: <?xml version="1.0" ?> <EmployeeDetails> <Employee EmployeeName="Johnny" EmployeeId="209007" CompanyName="ABC Inc." CompanyAddress="Bangalore" ContactNo="0000000" /> <Employee EmployeeName="JohnnyDepp" EmployeeId="78452" CompanyName="ABC Inc." CompanyAddress="Bangalore" ContactNo="0000000" /> <Employee EmployeeName="JohnnyStechhino" EmployeeId="45678" CompanyName="ABC Inc." CompanyAddress="Bangalore" ContactNo="0000000" /> <Employee EmployeeName="JohnDoe" EmployeeId="45981" CompanyName="ABC Inc." CompanyAddress="Bangalore" ContactNo="0000000" /> <Employee EmployeeName="Soumyadeep" EmployeeId="12345" CompanyName="ABC Inc." CompanyAddress="Bangalore" ContactNo="0000000" /> </EmployeeDetails> …

Member Avatar for NormR1
0
4K
Member Avatar for joe_ojah

Hi everyone I am making a system where i have to refresh the database after updating it. I am using a JTable and a mysql database, but i have to close down the application so that the updates can be implemented.Is there a way of refreshing the connection session, or …

Member Avatar for JoshuaKissoon
0
330
Member Avatar for ErlendHL
Member Avatar for sureshjohnviani

hi everyone, i name is suresh john viani. i am a final year student in computer science. i need some [U]unsolved problems or some topics in networking and image processing[/U] to carry out as my project. thank u all

0
24
Member Avatar for DoEds

Arg... Guys can you correct my code? 'coz it gives me a wrong output if i input "3 , 1, 2 or 1, 3, 2 or 3, 2 ,1" [CODE]import javax.swing.*; public class OutputGreatest { public static void main(String[] args) { int uInput1,uInput2,uInput3; int maxValue; uInput1 = Integer.parseInt(JOptionPane.showInputDialog(null,"<1>Input a number …

Member Avatar for DoEds
0
126
Member Avatar for shirup

i have difficulties in this area and am kindly requesting for your help.i need to submit an assignment by the end of today.please help

Member Avatar for NormR1
0
105
Member Avatar for ryathegr8

slaamz guls and guys! can any body tell ,how to validate input to check whether it in Integer only?? it shouldnot be in Double, Long and float in type..... i am writting simple code for simple calculator.... plz reply me fast if any body knows... regards m0m0

Member Avatar for javaAddict
0
85
Member Avatar for Chaster

Hi all, I've been searching for some time without any success. Here's the problem: I have an SWT GUI, which contains some UI elements placed onto a Composite. I would like to dynamically add a new Composite to the old one, when a certain event is triggered. Fine everything works …

Member Avatar for mostafaelshafei
0
466
Member Avatar for sunil_skmd

Hi, I am new to java. i want to use a switch statement on operators that are in read as strings. Like "==","!=",">=","<=". Please help me to do this as i cannot use even their ascii value of these operators to switch the cases.

Member Avatar for javaAddict
0
213
Member Avatar for avnish1728

Hi, I am calling javascript from java and calling a function, and that function on an image i am calling onmouse over. So now the problem is, I have two jsp, secord inside first. when i click first jsp where is onmouseover, it's working fine and after that i am …

Member Avatar for fxm
0
101
Member Avatar for Mr.UNOwen

Hello, Just recently I learned how to make a game with java using an applet and I was wondering how I’d go about making a java game for cell phones?

Member Avatar for johnfl
0
89
Member Avatar for evangelyngulip

hi.will you please help me in making a Payroll System that using a Java?Thank you.

Member Avatar for rboffers
0
45
Member Avatar for pi_lord12

I'm making a JPanel for a game. I want the background to be an imported image, so I set up a ClassLoader to import the image and converted that to a URL. However, that URL appears to be null, as when I try to put the panel into a JFrame, …

Member Avatar for pi_lord12
0
156
Member Avatar for darling332001

Friends, I'm taking a Java programming class online and it seems that the lecture nor the book explains in detail the finer points needed for my programs to work. Thus far, I've gotten by with what I know of prior languages and trial and error. However, I'm having problems with …

Member Avatar for tong1
0
268
Member Avatar for smoothe19

How do i create such a thing like a txt file where i can save usernames and passwords? but is protected that only certain users can access and edit the usernames and passwords? Please help I tried using a txtfile but i realized anyone can access it...is there anyway of …

Member Avatar for NormR1
0
91
Member Avatar for jiraiya

Hi everyone, I'm having a problem with a JUnit test I've written. I think there should be a simple solution but I can't work out what's wrong. I'm new to using JUnit so any advice would be a big help. Here's the test class below. At the moment I'm just …

Member Avatar for Taywin
0
100
Member Avatar for subhankar02dey

I want to know using Java Sript, how can I get sub buttons when I mouseover a button, for example, in daniweb.com, when I mouseover Web Development button, then it expands and shows PHP, ASP.NET, Cold Fusion, ASP, JSP and so on....... How I can make this type of button …

Member Avatar for fxm
0
102
Member Avatar for ttboy04

hello, I have called getFruits method from another class (another class is called vegetables). I can't seem to add the names of the fruits in myTable TreeSet in class Test. The error I am getting is "cannot find symbol - variable length". Can anyone help me. Thanks [CODE]public class Test …

Member Avatar for ttboy04
0
138
Member Avatar for smoothe19

My program is not case sensitive it does not display the output my proff wants PLEASE HELP! I don't know how to make it case sensitive The output should be: As entered 0:a:apple 1:a:Apple 2:z:Zone 3:a:apple Bubble Sorted 0:a:apple 1:a:Apple 3:a:apple 2:z:Zone Selection Sorted 1:a:Apple 0:a:apple 3:a:apple 2:z:Zone My program …

Member Avatar for NormR1
0
436
Member Avatar for roezer

I am not a developer I am a user of the Internet and very active so active that I need to use a password manager now the problem with this is that I use the password manager to save me time and one of the biggest problems is that some …

Member Avatar for roezer
0
131
Member Avatar for WargRider

I am creating a custom 2d turn based game engine in Java, and so far everything works great. Currently, I have come to the dreaded networking :), and I made a test code, prototype of the network that I would like to create. It uses Java's MulticaseSocket class, DatagramPackets and …

Member Avatar for WargRider
0
350
Member Avatar for torkolort

Hi, I'm new to JSP and I'm trying to make a simple registration form. I've looked at examples and tried to do the same thing, but I have some problems. What I have so far is register.jsp : [code]<div id="register_container"> <form action="registrationProcessor.jsp" method="post"> First Name <input name="firstname" type="text" class="inputbox"/><br/> Last …

Member Avatar for ~s.o.s~
0
359
Member Avatar for lightner86

Good Evening to all.. Can someone help with regards to converting decimal to hexadecimal? I'm using stack. I am done. in doing Dec to binary and Decimal to Octal. My problem is how to convert decimal to hex? specially if its include now with letters A to D.. pls i …

Member Avatar for JamesCherrill
0
131
Member Avatar for nettle4k

Hi, I want to draw a rectangle but I want a user to specify its dimensions. Currently, I have 4 JTextAreas that take x, y, width and height values. I also have a button. I know how to display those values etc but I don't know how to link them …

Member Avatar for nettle4k
0
171
Member Avatar for hims4u

respected mods i am facing a very strange problem when i am trying to run any jsp code on tomcat server in fedora 13. i have installed tomcat6 by command as #yum install tomcat6 after that when i give the address as [url]http://127.0.0.1:8080/aa1.jsp[/url] (aa1.jsp being the name of my jsp …

Member Avatar for hims4u
0
527
Member Avatar for jefferlyn92
Member Avatar for NormR1
0
68

The End.