32,204 Topics
| |
import java.util.Scanner; public class Name { String lastName; String firstName; Scanner scan = new Scanner(System.in); public Name(String LastName, String FirstName) { lastName = LastName; firstName =FirstName; }; public String getFirstName() { return firstName; } public void setFirstName (String FirstName) { firstName = FirstName; } public String getLastName() { return lastName; … | |
hi what i wan to do is to get the customer ID from the glassfisn database and displaindey it in a drop down box in a jsp page. in the index.jsp page how to i call the servlet so that the the servlet would load the jsp page? i have … | |
i have a question on how to extends classes. i have three classes main, aaa, bbb classes. i want to draw something in bbb class and print in main. for ex main <-> aaa <-> bbb but nothing is being print at output. if i draw something in main, or … | |
Hi, I don't know if this question makes any sense, but i need to get some answers. I am working on a project, where i am using a file encrytion/decrytion program.Now i have this .java program which is working perfectly from the command prompt and encryting/decryting files Now , the … | |
i need a prog in java by which if u type any num u can get the corresponding alphabet in circular manner,eg:1=a,2=b.....26=z,27=a...,29- c.so on,plz do help...tnks in advance | |
i need help with simple tile map. i have 2d array as map. so i want to replce numbers in array with rect's. 0 = green rect 1 = red rect 2 = black rect and i want it so that the all tile are same size. when i run … | |
I have created login application using spring in my local machine using Apache + Eclipse. I exported WAR of the same without setting the target server as i am deploying the same on sun web server. Application successfully deployed on sun web server. Successfully opens welcome page when click on … | |
I want to create a method that is meant to protect against entering a wrong value for gender. The method **fineGender** below, will return true if the correct gender is entered and false otherwise. // postcondition: fineGender returns true if argument g equals M, m, F or f // and … | |
hi i want to add two dropdown boxes one for the make of the vehicle and one for the model of the vehicle. first the user need to select a make of the vehicle and then when he selects it only the models relevent to the make should display in … | |
hi i have a method which display a list of customer id's. the method is customerService.getAllCustomersID() how do i check whether this method returns a null list or list or customer id's appreciate a reply thanks | |
I tried to understand for loops but still not getting it....? please help me with its dry run i know its syntax etc but still not getting it i know it is used for multiple execution...until condition is satisfied please help me understanding in making patterns | |
Hi! Lets say i have this expression I10I20I-3++ which should give me 27. I just cant seem to find a way of removing those I's or if it is any other letter from the string. Not forgetting i have to then evaluate the expression. I tried using regex but no … | |
**My assignment:** Write a program that extends the example that we have done in class. Create a class called Trapezium, which is determined by two parallel sides “a” and “b” and the height “h” between them.The area of the trapezium can be calculated as Area = (a+b)h/2 The perimeter = … | |
I'm sure everyone has seen this at one time or another. I'm having trouble with the selection sort class. It should take this input: apple Apple Zone apple And return it as: 1:a:Apple 0:a:apple 3:a:apple 2:z:Zone I'm getting it as #0,1,3,2. here is the snippet I'm working with. Thanks for … | |
HI i have a entity class vehicle and a entity class Customer. A customer has many vehicles, so in the vehicle entity class is as below @Entity @Table(name = "VEHICLE") @XmlRootElement @NamedQueries({ @NamedQuery(name = "Vehicle.findAll", query = "SELECT v FROM Vehicle v"), @NamedQuery(name = "Vehicle.findByMiles", query = "SELECT v FROM … | |
Hi, i wanted to install maven in my windows 7 laptop.so i downloaded maven bin.zip file from maven website.then i extracted it to the program files as they have said.then i gave the relevant environment variables.but when i'm trying to check that the maven has successfully installed by running the … | |
whenever i try to install plugin in eclipse ... from help->install new software... when i give the download link in the workspace it gives the error of multiple problem and says "unable to read repository" .. what that mean ? any solution ? | |
I need idea for some basic java program based on some real life examole using encapsulation,inheritance and polymorphism. Can you just give me outline and I will code the problem statement..? | |
According to new research from Kaspersky Lab, in the form of a report called [Evaluating the threat level of software vulnerabilities](http://media.kaspersky.com/documents/business/misc/Kaspersky_Lab_Report_Software_Vulnerabilities_final.pdf), 72% of Java users haven't switched to the latest, safest, version despite highly publicised vulnerabilities and resulting security exploits. ![dweb-java011](/attachments/small/0/dweb-java011.jpg "align-right") And it's not just Java, the report also … | |
Error I get when compiling using Xlint is: where E is a type-variable E extends Object declared in class JComboBox waring: [unchecked] unchecked call to addItem("blank") as a member of the raw type JComboBox c1.addActionListener ( new ActionListener() { public void actionPerformed(ActionEvent e) { if(c1.isSelected()) { fillSF2MC(); c3.setEnabled(false); playBtn.setEnabled(true); faceCombo.removeItem("Blank"); … | |
Hi, I am new to php. I have copied one php application from one linux server to other linux server after copy application is working fine but the applet to view image in that application is showing two error messages. error is : java.lang.NullPointerException at com.primeleaf.viewer.manager.DocumentManager.setDocument(DocumentManager.java:123) at com.primeleaf.viewer.manager.CommunicationManager.init(CommunicationManager.java:76) at com.primeleaf.viewer.DocumentViewer.init(DocumentViewer.java:67) … | |
I've been working on this project for the past couple of days. I can get the code to run, however, i'm suppose to be able to drop the java if I type -1 into the spot. I don't know how or where to place it. Here is the assignment and … | |
create a console application that compute the area of triangle, and ask the user if he want to repeat the program. but i haved an 8 error saying cannot find symbol in line 19,23,26,27. import java.util.Scanner; public class Area3 { public static void main(String args[]) { Scanner input = new … | |
Hello world ! I have two arrays (max 100 characters) that I want to align, and add an "-" when there is disparity I found the Needleman–Wunsch algorithm, which is based on dynamic programming, and the Smith–Waterman algorithm is a general local alignment method also based on dynamic programming but … | |
I can't figure out how to make a portion of the text bold in the below line(and others). This text is output into a popup dialog. Prefer the first portion "trimmed/squeezed" to be bold. I even tried inserting html code lol. Tried setBold and everthing else I've found on the … | |
Hi I'm working on the implementation of a boolean method to check if an expression has balanced parentheses using recursion. I cant figure out how to check if two elements of a given expression match i.e ( ). I was able to finish it without a problem using stacks, but … | |
Hello, I am trying to display text(JLabel) above a 3 x3 tic tac toe grid. The JLabel is not displayed. Only the grid shows up. I would be grateful for any help. Thank you! import java.awt.*; import javax.swing.*; import java.applet.Applet; public class Game extends JApplet { LayoutManager layout; private JPanel … | |
Hello, I have tried making a merge sort method, but I am getting an `Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 .` How do I fix this error, I have tried but I can not find the error: public class MergeSort{ public static int[] merge_sort(int[] b){ if(b.length <= 1){ return b; … | |
I am using GUI in netbeans to create a combo box. I want to import all data of a column from database dynamically not manually to a combo box. | |
I'm making a paddle and ball game, a bit like pong but instead of another paddle im using the top of the frame, plan to make it into a football sort of game eventually with a bit of work, I have been able to add the ball to the frame … |
The End.