35,618 Topics

Member Avatar for
Member Avatar for carmzy

I'm can you help me how to count my username and password using an array. I confuse where should I put my counter inorder to up to 5. Hope your Positive response..... here is my code: [code] String[] username=new String[5]; String[] password=new String[5]; public void actionPerformed(ActionEvent e) { if(e.getSource().equals(btnAdd)) { …

Member Avatar for NormR1
0
102
Member Avatar for PearlLV88

import java.util.Scanner; public class Exercise3_1 { public static void main (String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter three edges: "); int integer = input.nextInt(); int edge1 = 1; int edge2 = 1; int edge3 = 1; // First condition: edge1 + edge2 should be greater than or equal …

Member Avatar for NormR1
0
172
Member Avatar for ilovejava

i have to write a program that displays the value of pi for values for i = 10000,20000.....,and 100000 i have to use the following series pi = 4(1-(1/3)+(1/5)-(1/7)+(1/9)-(1/11_+...+(1/(2i +1))-(1/(2i +1)) any ideas i have to do a program with looping i cant use arrays can someone give me a …

Member Avatar for NormR1
0
1K
Member Avatar for lse123

I GUESS THIS IS ERROR - CAN YOU CONFIRM? "You can send an ImageIcon object as the Image argument that drawImage() expects." T/F "To start playing the AudioClip, you need to call the start() method on it." T/F // On the obj mean here?

Member Avatar for mKorbel
0
199
Member Avatar for Feriscool

I'm getting a null pointer exception on lines 17, and 22. I'm not positive, but does it have to do with "int number1 = data[0];" having to be static? [CODE]int number = 100; public static final int[][] NUMBERS = { { 1205, 1206 } }; public static boolean method1() { …

Member Avatar for mKorbel
0
197
Member Avatar for sohiabmaroof

hi all i m facing problem populating jtable with the data of database !m using arraylist to populate jtable .but the problem is that m unable to add databse data into jtables.i m only getting the last row elements of databse. i should be getting this data in the jtables …

Member Avatar for sohiabmaroof
0
190
Member Avatar for Dorar

[COLOR="red"]This is Reservation program full code written in JAVA <from the web> No Problems are in running process. I'm required to convert it to C language.[/COLOR] -- [COLOR="Green"]1- these are lines that i did not understand it. <could any one explain>[/COLOR] a. private static DataInputStream k = new DataInputStream(System.in); //what …

Member Avatar for Dorar
0
231
Member Avatar for keeda

Hi, I have to use Java to build a scrapper, that takes a product name and searches for that product on an e-commerce website. I understand that I will have to use an external library that would parse the html page for me, given the link. But how do I …

Member Avatar for ~s.o.s~
0
188
Member Avatar for anand01

Hi all , I need to transfer data from jsp to servlet.. am accessing db from servlet .. I need to tranfer those db content to my jsp page how can I achieve that . thanks in advance

Member Avatar for anand01
0
5K
Member Avatar for lbgladson

I have a problem to determine Easter Sunday based on the algorithm invented by Carl Friedrick Gauss in 1800. I have written my code and double checked the Math several times but not matter what year I type in it tells me that Easter is on April 9th so I …

Member Avatar for Taywin
0
289
Member Avatar for sha11e

If I need a string or an int from the user, how can I make sure that that is what they inputted? The lame way of putting EVERYTHING in strings and then somehow check? Or maybe throw-catch? I tried the try-catch but had a few problems. The examples I saw …

Member Avatar for NormR1
0
304
Member Avatar for sahilsinghi

i tried to make a executable jar file.a program as follows [CODE]import java.io.*; class studentmarks { String name; double engmarks,phymarks,chemmarks; double tot,avg; public studentmarks(String s,double p,double e,double c) { name=s; engmarks=e; phymarks=p; chemmarks=c; } void compute() { tot=engmarks+phymarks+chemmarks; avg=tot/3; } void display() { System.out.println("nameis:"+name); System.out.println("totalis:"+tot); } }[/CODE] i saved it …

Member Avatar for hfx642
0
182
Member Avatar for madoman10

I am trying to prompt the user for a series of Integers and stop when the user enter a negative number and i am trying to add the number the users entered in a linked list. I was thinking about using the scanner class but i am having problems with …

Member Avatar for Taywin
0
78
Member Avatar for sathya88

how to send mp3,avi(large) files via socket...small files with size less than 100kb is possible but how to send large file..

Member Avatar for NormR1
0
8K
Member Avatar for nikelin

Simple resources loader tool which help to find some file in classpath and load it's content with respect to sanitizing policies.

Member Avatar for JamesCherrill
0
407
Member Avatar for hszforu

i have to convert a string into ascii format and then into it's binary. I know how to convert between int to binary using toBinaryString, so how to convert ascii to int. Or is there any other way to convert string characters into binary form. In short suppose there is …

Member Avatar for hszforu
0
812
Member Avatar for kevvek

How do i write these in a flowchart: ConverterMenu1 cm1 = new ConverterMenu1(); CurrencyConverter cc = new CurrencyConverter(); MeasurementConverter mc = new MeasurementConverter(); Please help me quick!

Member Avatar for NormR1
0
215
Member Avatar for SagarSe7en

Hello Friends! Want to Post something i know might be very weird but this is how it goes. In Java we use [CODE]RS.getString("FirstName");[/CODE] to get the value of the column FirstName from the database. If the valueis not detected then it shows null in the Text Box. [CODE]RS.getInt("StudentID");[/CODE] to get …

Member Avatar for SagarSe7en
0
388
Member Avatar for Feriscool

This is giving me a nullpointerexception: [CODE] public static final int[][] ARRAY = { { NUMBERS } }; public static boolean method1() { for (int[] data : ARRAY) { int numberOne = data[0]; } if (numberOne != numberTwo) { method2(numberOne); } } public static boolean method2(int number) { int count …

Member Avatar for JamesCherrill
0
152
Member Avatar for tyson.crouch

Hey Guys, I'm just trying to set up my Virtual Host file to set up an alias URL. I've configured my Windows\System32\drivers\etc host file to include the following: [CODE]127.0.0.1 internal.test[/CODE] this works well, however I want to be able to do the following: Have this: [B][U]internal.test:8080/Test/[/U][/B] Look like this: [B][U]internal.test/[/U][/B] …

Member Avatar for tyson.crouch
0
74
Member Avatar for lynnb86

I have all my code done, but it keeps saying no suitable constructor found (close to the bottom on the first code- ProduceInfo pInfo section- line 150) and cannot find symbol (line 62). I have read over this code, searched the errors on the net, and watched videos to try …

Member Avatar for lynnb86
0
159
Member Avatar for janice91

Dear Experts, I am new to the LinkedList concept and trying out coding a LinkedList problem which require me to do Insert newInteger based on the Index, Remove Index and Change oldInteger to newInteger based on Index. Please kindly advice what i should code in my [code] public void insert(int …

Member Avatar for Taywin
-1
187
Member Avatar for raviaaaa

After installing tomcat 6.0 server into my machine iam not able to find "start up and shut down" files under bin directory pls tell how to solve this issue

Member Avatar for Taywin
1
187
Member Avatar for dharma117

[CODE] <%-- Document : Login1 Created on : Jul 1, 2011, 1:16:12 AM Author : Dharmendra --%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page import="java.sql.*" %> <%@page import="com.p1.*" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body><center> <form action=""> <br>UserID : <input type="text" …

Member Avatar for SagarSe7en
-2
333
Member Avatar for ankit.pandey3

[CODE]import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.util.TimerTask; /** * @author Adrian BER (beradrian@yahoo.com) */ public class PopupAnkit extends JPanel implements ActionListener{ private JToggleButton invokePopupButton; private JFrame popupWindow; Statement stmt=null; ResultSet rs=null; // int tempCount=0; public static int count=0; /** * Constructor. …

Member Avatar for ~s.o.s~
0
417
Member Avatar for BuhRock

So I created my ArraySet class from an interface. I'm trying to test my union method in my SetApp class, and I truly don't know where to begin. Can someone push me into the right direction? Btw, I know my SetApp class is messy atm, but I was just testing …

Member Avatar for ~s.o.s~
0
379
Member Avatar for manjushreekaran

i want to write a java code that prints the value for xml tags from database in java??? which method is suitable for this??? currently i can able to print <company comp:loc=" "/> here i need to get value for loc=" "... how can i achieve this???

Member Avatar for leiger
0
106
Member Avatar for archie.herbias

Can you suggest a program that i can submit? I need your help for suggestions.. any programs that involves GUI.. simple programs could be.. Thank you!

Member Avatar for leiger
0
226
Member Avatar for gayathriselvam

I hav given the name of file as class name and saved it as .java by creating a folder in c drive.when i try to compile it shows the following exception.pls help me to resolve from this problem C:\Program Files\Java\jdk1.7.0\bin>javac HelloWorldApp.java javac: file not found: HelloWorldApp.java Usage: javac <options> <source …

Member Avatar for leiger
0
193
Member Avatar for mitchiexlolz

I am currently making my project and it involves graphing functions. I have chosen Java because as I have surfed the net, i was able to download a library (JGraphT) that tells me that it can help me graph mathematical functions. Now, my problem is, i dont know how to …

Member Avatar for leiger
0
122

The End.