36,051 Topics
![]() | |
Problem: you are the owner of a new take-out restaurant , MCBurgers, currently under construction . you want to determine the proper number checkout station needed , so I have to build a java code using Netbeans to determine the optimal number of servers needed 1. the maximum waiting time … | |
Hey, So I have an ArrayList that has some people in it. It's like: First Name, Last Name, and Position (At a job). So, I have it make the name complete. so like... Last name and then first name, no space... So, then, I need to sort the ArrayList by … | |
Hi everybody! Firstly, I apologize you if my English is not enough good, I'm from Spain. I have a problem in JSP. I'm doing my software engineering master's final project and I have a hierarchy of users with different permissions for each. The problem I have is I want to … | |
Hi all, I am very new to Java Programming and am currently trying to write a program to return the last character of a string, entered by the user. So far I have this: [CODE] import java.util.Scanner; public class lastString { public static void main (String[] args) { String string1; … | |
I have two problems 1) I want to display the customer details like account number, name, dob, etc. in a different customer account frame (written in another class) and hence I want that the same username that I logged in with, to use in the select query( i.e. select * … | |
ok i got this assignment, and i'm a bit confused about what this method is supposed to do. i have to create a "setLab" method and accept a Grade object (which is already done and provided). this is what i got so far: [CODE]public class CourseGrades{ private Grade [] grades … | |
Hello i am having a problem in removing all headers from a Part in java mail.The code i use : [CODE] Enumeration headers = part.getAllHeaders(); while (headers.hasMoreElements()) { Header h = (Header) headers.nextElement(); System.out.println(h.getName() + ": " + h.getValue()); part.removeHeader(h.getName()); } [/CODE] The System.out.println gives me right names an values!!But … | |
hey, can someone explain to me exactly how this code works because i dont really understand the logic of it. [CODE] public void paintComponent(Graphics g) { super.paintComponent(g); Dimension d = getSize(); checkOffScreenImage(); Graphics offG = mImage.getGraphics(); offG.setColor(backgroundColor); offG.fillRect(0, 0, d.width, d.height); Graphics2D g2 = (Graphics2D) mImage.getGraphics(); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); // draw … | |
Hi, i'm trying to use regex to delete lines which starts with a letter or a number. for example: if i have a text file with many lines and i want to delete every lines which starts with S and 2. What operator do i have to use? i tried … | |
i need to sort by last name [CODE]import java.util.Scanner; import java.util.ArrayList; import java.util.Scanner; public class TestStudent { public static void main(String[] args) { //Course Code String [] courseNumber = {"MTH151","MTH201","ITF215","ENG101","HIS210","BIO120"}; //Course Name String [] courseName = {"Statistics","Calculus I","Programming in Java",-"Composition","US History","Biology "}; //Credit int [] credit = {3,4,4,3,3,4}; ArrayList <Student> … | |
Hi i need to press non-english keys like "ü","ö" in java but i didnt managed to do this using robot class. So how can i press non-english characters? | |
I want to connect to an FTP server and transfer a file with Java. I could not find anything about secure FTP.Can anybody help me about this? I also want to ask that if i can connect to an FTP server using SSL with command line. If i can connect … | |
Hi, I want to launch a java app from within python, and read back the test the java app writes in a command window. This is using python on windows. So, I have a basic java app which brings up a cmd.exe widow, and prints "hello world", waits for 5 … | |
I am retrieving values from database. I initialized a variable outside the loop. I am using while loop to move one record after other to last using ResultSet object.next(). Inside the while I am assigning the record value to the variable initialized outside while. But It shows variable might not … | |
How do i share variables between java beans, do i need to use jspGet property on the second jsp and re-set it, or can i skip that and do it another way. i need to get a value from my login.jsp and UserDataBean to my process.jsp and my MyFormBean so … | |
Dear Friends..Hi..! i wanna implement a graph by java..& as i searched i think the best way is using jgrapht & jgraph libraries.. but i dont know exactly how.. can u help me? | |
Dear friends, Thanks in advance..... I'm working on project which includes multiple frames. whenever I need to open other frame with first one get closed , I have used new instance of new class(frame) and I just make setVisible(false) for previous frame. Now after some use , there is problem … | |
Hello everyone! So I have to do this project for computer science class. We have to make a class that generates 50 odd numbers in order starting at 1 and stores them in an array of 50 int elements. Then we have to arrange the numbers we get so that … | |
Hi all i need a piece of code that will find a value in an array and change it. [CODE] private int[][] level = new int[][]{ {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, … | |
I got Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at this line.[CODE]File f1= new File(args[0]);[/CODE] I guess i have to give a command line argument. How to give a file as command line argument. Or is this someother one? | |
hi i want to upload my application in google web stroe with help of my own desktop application which allows me to login as well as to upload my application on web stor | |
Im playing around with the clone method of arraylist and have a few questions. This is what i did with it: [CODE] ObjectMaker item1 = new ObjectMaker(); ObjectMaker item2 = new ObjectMaker(); ObjectMaker item3 = new ObjectMaker(); ArrayList<ObjectMaker> arrayList = new ArrayList<ObjectMaker>(); arrayList.add(item1); arrayList.add(item2); arrayList.add(item3); Object theList = arrayList.clone(); [/CODE] … | |
Okay, so I am trying to make a game much like an old game called "Chip's Challenge". Right now I have a square that I can control with the arrow keys but I'm not sure how to make a wall that cannot be passed through, could anyone help me? | |
Hy everyone, I am programming boggle in Java. I have some problems though. method guess() should be repeated for 3 minutes, when the 3 minutes are over method endGame() should be executed. How do I have to do this? I think i need to use the java.util.Timer but I have … | |
hello, i am a begginer in java programming and i have a question, my question is, i want to create a java loader that means how to load components, images ... and to display a screen that indicates the applet is loading components and when components, images are loaded, just … | |
Hey guys I am writing my first program ever in java starting tonight and all has actually gone smooth which has been a surprise but I have run into a problem with an if else area. Basically, what I am suppose to be doing in this section is the user … | |
Hi guys. I have a Java program that works in 3 stages after connecting to a MySQL database to give desired results. The first stage involves a function X that returns a value it finds in table A or zero. The second stage involves a function Y that's only allowed … | |
Hi Everyone I have been hard at work on this Java program involving bicycle gears, one of the problems is the while loop, should a user enter a negative number in the inputs then i want the user to re enter it until a positive number comes up however the … | |
So this is what i am trying to do. Create just a 5 element array and using the scanner utility get some information from the user that can then be passed down to an object that is dynamically created by the array. The object requires paramaters due to constructors. [CODE]Employee[] … | |
hy everyone, I have a problem, I am making a little program for a game; When I start my game the timer has to start counting and after 3 minutes the game has to stop. I need to know a way to program a very simple counter/timer in order to … | |
I am using a Jtextpane in my application. I want to switch to line number I want . How can I implement Goto line feature in java for jTextpane. please help.... | |
what are the reasons for creating a website using java technology and how does this technology ensures security of the website | |
Hye everyone, I am trying to make a 2d-char array, fill it with random letters(chars) and print it. If I do it like this I get a ArrayIndexOutOfBoundsException: 0. I am a newbee. I import my prefs(width, height) from static getters in the class preferences. Can anyone help me please? … | |
Our teacher gave us an assignment.Can anyone help or give me some idea on how to solve this java problem? im still learning java. Here's the problem: "Write some code to demonstrate to yourself the chain of construction. Create an inheritance hierarchy of 4 classes. Give them any names you … | |
Design program Infix that will convert the expression from infix notation to post fix notation using Stack operation. Observe hierarchy of operators. Sample Input/output Enter infix : 4+6*7-8 Postfix equivalent is 467*+8- | |
I am using a Jtextpane in my application. I want to add line number in it. How can I do it. please help.... | |
Hello, I have a to make a class called fibonacci. This is what is given to us : fibonacci(0)=1 fibonacci(1)=1 fibonacci(n)= fibonacci(n-Â1)+fibonacci(n–2) Below is an example of running the fibonacci class as an input of 6. The output is: fibo(0)=1 fibo(1)=1 fibo(2)=2 fibo(3)=3 fibo(4)=5 fibo(5)=8 fibo(6)=13 [B]My code is:[/B] [CODE] … | |
Hi, I am trying to get a Javascript working in an XSL document and i can't seem to make it work for some reason. I have placed the following code within the head of my document. [CODE] <msxsl:script language="JScript" implements-prefix="user"> <![CDATA[ function popup(mylink, windowname) { if (! window.focus)return true; var … | |
define briefly about DTW algorithm for voice recongnition also how to implement java speech api in netbeans???????????????????????????????????? | |
Other than the usual [CODE]AudioInputStream stream = AudioSystem.getAudioInputStream(ClassLoader.getSystemClassLoader().getResource("____.wav")); DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat()); Clip clip = (Clip) AudioSystem.getLine(info); clip.open(stream); clip.start();[/CODE] Since the buffer limit is 2mb for an UNCOMPRESSED wav file so... it's pretty obvious how crappy that is... and that's about all I found on the net since … | |
Can anyone help me with this java problem? Here's the problem: "Write some code to demonstrate inheritance polymorphism. Create a superclass class with 3 subclasses. The superclass should have a method that prints out a line identifying the current class (something like "I am a Superhero"). Two of the subclasses … | |
Is there any [I][U]relationship[/U][/I] among the [U][I][B]bounds[/B][/I][/U] of a [B]type [I]parameter[/I][/B] in [B]Generics[/B] i.e. whether they are channeled([B][U]subclass[/U] or [U]superclass[/U][/B]) [U]uniquely[/U] [I]sequencially[/I] or [COLOR="Green"]differently[/COLOR] ? :confused: We use [COLOR="Red"]extends[/COLOR] clause once to inherit some only one class and to inherit others we have to [COLOR="red"]implement[/COLOR]. But for multiple bounds in … | |
hello all i have a jsp page.in which i am searching a particular string.what i want is to search details corresponding to that particular string and show them in the html table. can anybody suggest me the fastest way to search.Currently i am using shell scripting and it is taking … | |
In which package is Grid(in-built) class is there? I guess util. But Grid creation using create() shows error. | |
Hello. I'm not really sure on how to explain the problem, but here goes. I'm creating a Traffic Simulator of a cross junction. I currently have car objects moving, with working traffic lights. I created a variable array for the car class which creates several car objects. Then the lane … | |
i have a codelike this: [CODE] do { int i; }while(i!=0); [/CODE] Shows error "Cannot find symbol i" | |
Write a java program to repeatedly get two numbers from the user and display the sum of their squares. User numbers and result are real numbers. Repeat this interactive input/output until the first number exactly matches the sentinel value 990. Do not process the input matching the sentinel value. For … | |
i'm a beginner in coding and i try to write a parking lot program. There are 3 classes in my program. Could anyone help me out ,I got stuck in the record class which is datetime in and out and how to set overtime price. ****sorry about my bad english. … | |
I m developing module in my eclipse IDE, I have designed a web page using JSP and Hibernate concepts where in i have to enter required details and after clicking on submit button they are directly entered into database. this part is done successfully but the only problem is when … | |
I am developing a tool using java swing. In it I have to read a .vbs file. I have used the following code for it. Scanner fileReader1 = new Scanner(new File(fileName),"US-ASCII"); while (fileReader1.hasNext()) { System.out.println(fileReader1.nextLine()); } where fileName is valid .vbs file path This is working only for .vbs files … |
The End.