32,199 Topics
| |
// 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; … | |
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? | |
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)); | |
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! | |
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] | |
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. | |
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 … | |
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 … | |
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. | |
can any one send me ECG wave(puls) generatimg code for java. PLS............... | |
[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 … | |
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 … | |
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 … | |
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(); … | |
I am currently trying to delete lines of a file in java? | |
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.. … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? … | |
I really want to have an example of of this program in java but i cant find it in here.. >..pls response ASAP.. >thnx | |
see the attachment Prac11 on how to write GUI | |
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 … | |
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 … | |
> 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) { } … |
The End.