32,199 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 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 … | |
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 |
The End.