35,618 Topics
![]() | |
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)) { … | |
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 … | |
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 … | |
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? | |
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() { … | |
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 … | |
[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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
how to send mp3,avi(large) files via socket...small files with size less than 100kb is possible but how to send large file.. | |
Simple resources loader tool which help to find some file in classpath and load it's content with respect to sanitizing policies. | |
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 … | |
How do i write these in a flowchart: ConverterMenu1 cm1 = new ConverterMenu1(); CurrencyConverter cc = new CurrencyConverter(); MeasurementConverter mc = new MeasurementConverter(); Please help me quick! | |
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 … | |
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 … | |
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] … | |
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 … | |
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 … | |
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 | |
[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" … | |
[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. … | |
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 … | |
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??? | |
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! | |
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 … | |
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 … |
The End.