36,051 Topics

Member Avatar for
Member Avatar for cutekola

// accept numbers from 0.1 to 99.9 then count the number of tens, ones, and tenths import java.io.*; public class accept99_9 { public static void main(String[] args)throws IOException { BufferedReader abc=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter a value: "); String input=abc.readLine(); float v=Float.parseFloat(input); float tens=v %100; float ones=v %10; float tenths=v %10; …

Member Avatar for cutekola
0
222
Member Avatar for rwagnes

I have an executable that contains java components. From the java code, I need the access the executable's modified timestamp (so I can use the year). Any ideas?

Member Avatar for rwagnes
0
99
Member Avatar for Rajesh.D.N

<html><body> <%@ page import="java.sql.*" %> <% String user="root@localhost"; // root itself String password="pwdl"; String connectionURL = "jdbc:mysql://localhost/Database_name"; Connection connection = null; Statement statement = null; ResultSet rs = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); connection = DriverManager.getConnection(connectionURL, user, password); statement = connection.createStatement(); rs = statement.executeQuery("SELECT * table"); while (rs.next()) { out.println(rs.getString("name")+"<br>"+rs. getString("emailid")+"<br>"+rs.getString("contents ")+"<br>"); } …

Member Avatar for masijade
0
111
Member Avatar for wegdan

i need to know if there is a way to make the progrm change the background color of a button next to another button [ (button[i].next).setBackground(new Color(0,0,204));

Member Avatar for Ezzaral
0
62
Member Avatar for kiennhoit

My Os is CentOS 5.0. I need Jboss for it, but i can't find it on internet. Please help me! can you give me link to download Jboss.? Thanksss!

Member Avatar for masijade
0
100
Member Avatar for filanfis8

i have this problem my file Computer.java is in desktop but not work :$ [CODE]public class Computer { public static void main (String []argv){ System.out.println("BllaBllaBllaBlla"); } }[/CODE] here is the screenshot [URL="http://aycu40.webshots.com/image/30159/2002091781242929104_rs.jpg"]http://aycu40.webshots.com/image/30159/2002091781242929104_rs.jpg[/URL]

Member Avatar for parthiban
0
80
Member Avatar for ravinderreddy

want to capture the system idle time. Means if the user did not press any key or did not move the mouse then it is considered as system idle time. I want the code for this in Java on windows operating system. Please help me.

Member Avatar for zOlive
0
216
Member Avatar for iCez

Can anyone help me debug this, I am getting a lot of errors. :( here's the example case: [I]User inputs.. Enter Row: 3 Enter Column: 3 Output 1 2 3 2 4 6 3 6 9 [/I] Here's my code: [CODE]import java.io.*; public class Test2 { public static InputStreamReader reader=new …

Member Avatar for iCez
0
94
Member Avatar for sawant_nitesh

What is the future of JAVA ? JAVA was overcoming Microsoft's .net because of it's platform independence. As in coming couple of years , Microsoft is going to launch a version of .net that will support all platforms like windows, unix, linux etc. Then will .net become trouble for JAVA …

Member Avatar for hopalongcassidy
0
183
Member Avatar for Phaelax

I've done custom components before, but never for a whole window. How would I go about changing the title bar on a window? I bought a book on UI designing from amazon, just hasn't arrived yet. I just need a basic place to start.

Member Avatar for peter_budo
0
93
Member Avatar for push

can any one send me ECG wave(puls) generatimg code for java. PLS...............

Member Avatar for masijade
0
54
Member Avatar for hidash_in

[B]the below code is to list the running exe files in the windows task manager. but i need only the running applications in windows task manager. if aybody knows pls help me by sending code for this. i am awaiting pls.[/B] import java.io.*; import java.util.*; public class GetProcess { public …

Member Avatar for masijade
0
187
Member Avatar for roadoggdna28

has anyone else had this problem? i downloaded java, then, when i tried to access it, this message popped up: "to restart the java(TM) installer, please refresh the web page" first of all, I wasn't even on the page when it happened then the same thing happened when i WAS …

Member Avatar for jwenting
0
54
Member Avatar for alexasmith

I don' t know how to logically go about this problem...I need to read a sentence (input) and then print the same sentence back out to the user in alphabetical order(could also include numbers). Oh and I am not allowed to use any kind of sorter such as 'sortwords'. This …

Member Avatar for Ezzaral
-1
98
Member Avatar for JavaNewbie07

I am trying to add the integer elements of two Linked Lists. How do I add the contents of two elements of a linked list. For example: public void main { ........ LinkList newList = new LinkList(); ......... Link link1, link2, linkAns; ...... ...... link2 = newList.deleteFirst(); link1 = newList.deleteFirst(); …

Member Avatar for JavaNewbie07
0
95
Member Avatar for qinise4
Member Avatar for venkatnavi

Hi, This is naveen, i am having a problem that, i am having a combo box in the JSP page when i select an item from that i am calling the onchange function. In javascript i am getting the value now i want to pass this value to JSP scriptlet.. …

Member Avatar for hudz
1
13K
Member Avatar for mCardos

The assignment ask for a looping statement and should print out a table of values for example N 10*n 100*n 1000*n 1 10 100 1000 2 2 200 2000 my code just prints the N 10*n 100*n 1000*n I am a noob at this but really trying! Can anyone help …

Member Avatar for mCardos
0
71
Member Avatar for nhlagumbi

Hi guys!!! i really need your help, i have an assignment due very soon. Its a java application and java applet, it should display the cpu ver, cpu speed, ram size and hard disk size of the lacal machine. PLZ help guyz

Member Avatar for nhlagumbi
0
445
Member Avatar for ssjoyce

Hi, Up until about 2 - 3 weeks ago my internet performance was great. I have Verizon FIOS and my connection speed is approx 5 Megs. My problem is that when I open a new internet window, it takes minutes for the window open and load. Processor sounds like it …

Member Avatar for zandiago
0
216
Member Avatar for newbieGirl

I don't know why I'm spacing out tonight, because I've been doing fine, but I'm stuck on one thing. I've already written the first part of my program (get integer input from the user, then calculate the product, and display), but the second part (not required, but I thought I'd …

Member Avatar for newbieGirl
0
134
Member Avatar for naomiauk

Hi everyone, I have been assigned a project where I must design a information extraction system for computer science conferences. This system must use java as its programming language. It must have a page where you can enter a keyword for example 'computer science' and the extraction system must search …

Member Avatar for nschessnerd
1
102
Member Avatar for everywherewego

ok so here is goes heres the question Write a JAVA program that takes a one-line sentence as input and then outputs the following response: If the sentence ends with a question mark ‘?’ and the input contains an even number of characters, then output the word “Yes”. If the …

Member Avatar for peter_budo
0
73
Member Avatar for PL.P27

Hi Everybody!! I'm new to java and am experementing with GUI and would like if someone could please help me, because I can't figure out how to fix the problem. The part in red is the part where I cannot figure out how to fix it because it says it's …

Member Avatar for PL.P27
0
3K
Member Avatar for mariejt

Good Morning! I am trying to create a Book2 object and assign to Inventory_Program6a. When I try the following: Book2 newBookTitle = Book2(); I get the error message: C:\java>javac Inventory_Program6a.java Inventory_Program6a.java:325: cannot find symbol symbol : constructor Book2() location: class Book2 Book2 newBookTitle = new Book2(); ^ 1 error I …

Member Avatar for cms271828
0
116
Member Avatar for triuno

Please help, I have the following problem: I have several domains and I used a short java script in order to refresh the index page in order to get rid of the advertisement that for ex register.com places there if you dont pay extra to remove it. ( the problem …

Member Avatar for MidiMagic
0
36
Member Avatar for rwarrender

Hiya, I'm currently working on a little java program that will scan through a directory, reading php files and then dump out a list of function names for that particular file. Does any one know how I can modify my regex to exclude functions that are inside /* */ comments? …

Member Avatar for rwarrender
0
81
Member Avatar for Cerberus

Hi all. How do you get values from an appended url string using JSTL? For example: redirect.jsp?pageid=23 -how would i get that value? Thanks.

Member Avatar for Cerberus
0
75
Member Avatar for gyle0123

I really want to have an example of of this program in java but i cant find it in here.. >..pls response ASAP.. >thnx

Member Avatar for peter_budo
-1
104
Member Avatar for Arthurmilo
Member Avatar for parthiban

Hi all , I tried one simple animation in Swing . Here's what the program has to do : when a button called "play" is clicked a circle should be moved from upper left corner down to the lower right corner. [code=java] import javax.swing.*; import java.awt.event.*; import java.awt.*; public class …

Member Avatar for nschessnerd
0
100
Member Avatar for wegdan

i am working on a cod of (attaxx game),and i have a problem with the buttons i can determine the co-ordinates (x,y) of the button and i want to change its background color but i do not have a reference of the jbutton object it self.is there is any way …

Member Avatar for Ezzaral
0
269
Member Avatar for bc030400412

> Write a function that accepts an array of integers and returns the second largest integer in the array. Return -1 if there is no second largest. > The signature of the function is public class bc { public static void main(String[] args){ } int f(int[ ] a) { } …

Member Avatar for Ezzaral
0
93
Member Avatar for ttamilvanan81

Hai everyone, I need to find the Latitude and Longitude values for any one of the Particular location from the Google Maps, using pure java class. I know, it's done by using javascript, but i need to use pure java class not javascript. If we provide full address of the …

Member Avatar for peter_budo
0
98
Member Avatar for omi.jain
Member Avatar for jamminjelly

Says grade isn't initializing import java.util.*; public class Test { static Scanner console = new Scanner(System.in); public static void main(String[] args) { char grade; switch (56 / 10) { case 0: case 1: case 2: case 3: case 4: case 5: grade = 'F'; break; case 6: grade = 'D'; …

Member Avatar for jamminjelly
0
98
Member Avatar for cat8882

Okay so I'm supposed to read in grades from a file add them together and get the average the letter grade the minimum grade and the maximum...no setting variables to the read in...and the sentinel is -1 at the end of the sequence...I'm a bet messed up...this is what i …

Member Avatar for Ezzaral
0
105
Member Avatar for kedarkhedkar

Hi All, I am doing a project which is struts based. I have included following files in build path of eclipse. servlet-api.jar jasper-runtime.jar jsp-api.jar struts.jar antlr.jar commons-beanutils.jar commons-digester.jar commons-fileupload.jar commons-logging.jar commons-validator.jar still I am getting errors: the import javax.activation can not be resolved at line import javax.activation.*; the import javax.mail …

Member Avatar for sillyboy
0
82
Member Avatar for MariaA

Hi everyone, I am new to java. I have a question? How can I store in to an array the values that the user enter, so later I can compare the two sets of array that the user enter. This is what I have: System.out.print("This program is going to find …

Member Avatar for ithelp
0
83
Member Avatar for Tenketsu

Hi Guys, This is probably a very basic query, but asnyways. I'm trying to write a jsp website involes doing some data calculations. However, I'm having problems trying to get my own java classes to be recognised by tomcat. So far I've tried :- 1. putting the classes in the …

Member Avatar for Cerberus
1
60
Member Avatar for ceyesuma

How can I .getText(long) ????? I can not figure out how to get a string from a GUI and turn a String into a long .

Member Avatar for ceyesuma
0
112
Member Avatar for himanjim

[B]I'm new to java servlets ...I installed Sun java SDK which acts as an server for running servlets.I spents many hours first just to compile servlets and generate the class files but now I don't have any idea how to run servlets on SDK. I tried a lot on Apache …

Member Avatar for himanjim
0
105
Member Avatar for preetham.saroja

hai, Its very urgent.can somebody tell m,how to add two textboxes and then display the result in the third textbox ,using keypress -in javascript.... regards....

Member Avatar for preetham.saroja
0
170
Member Avatar for Rashul

/*This is a what I've written so far- see below.*/ /*The program is to ask a user to insert values into array, print those values showing both index # and corresponding value, return average, min, change value of 1 array element, delete 1 element, compact the array. ALL these MUST …

Member Avatar for Ezzaral
0
2K
Member Avatar for mariejt

Hello Everyone, I feel like I'm going around in circles! I can't figure out why by JButtons won't perform their assigned functionality. I have a first, previous, next, last, and save button. I've created actionListeners and actionEvents for all butons, but they still produce nothing. Any insight is extremely appreciated!!!! …

Member Avatar for mariejt
0
118
Member Avatar for push

hellow friends, how can i get server port number by using java. please give me exampls codes for this program.

Member Avatar for jwenting
0
54
Member Avatar for iCez

Here it goes, we were told to make a Multiplication thingy that the user can [B]Input[/B] something like [I]5x5[/I] and then the [B]output[/B] will be the [I]answer[/I]. We were not taught on how to do it yet so I don't have any idea. I'm just hoping that someone can teach …

Member Avatar for Ezzaral
0
100
Member Avatar for w32.sysfile

i face a problem here.. i am creating a compiler for java, the compilation part is done,and now i have a problem in the running the class compiled.. i use the runtime.getruntime().exec() method to run the class.. and what happen is, for example, i have a simple java file like …

Member Avatar for lookof2day
0
157
Member Avatar for piers

okay I have been working on a little project of my own for a while. At the moment it prints out the chapters read and once 100% of the chapters read is greater than 100 it shows on the next line of my code the number of times the book …

Member Avatar for Ezzaral
0
94
Member Avatar for hidash_in

pls help how to open a file in an application using jsp and it should not open in a browser if possible pls send ur code as soon as possible.. pls help pls help.

Member Avatar for masijade
0
118

The End.