- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 3
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
import java.util.Scanner; class bank{ public void termDeposit(){ int principle; double rate,years; Scanner sc=new Scanner(System.in); System.out.print("Enter Principle Amount : "); principle = sc.nextInt(); System.out.print("Enter rate od interest : "); rate = sc.nextDouble(); System.out.print("Enter time period in years : "); years = sc.nextDouble(); double maturityAmount = (principle*(Math.pow(1+(rate/100),years))); System.out.println("Maturity Amount after " +years+ … |
|
Hello i have an problem with an inheritance query using JPA (There is my Class Hierarchy) +UsuarioGenerico (MappedSuperclass or Entity - but is Abstract) -+Usuario (Entity) -+UsuarioPorEmpresa (Entity) Then, when i try make an select for Usuario, i not obtain results i try with an NamedQuery: `@NamedQuery(name="Usuario.findAll", query="SELECT u FROM … |
|
Re:
package my_package; my_object obj_instance; String my_string; my_string = obj_instance.toString(); System.out.println(my_string) ; // gives my_package.my_object@asj128 // I've lost track of obj_instance but it in memory // and I want to recover it from my_string , like my_object obj_instance1 obj_instance1 = ( my_object) my_string ; some thing like string to object converstion … |
|
Re:
Hi guys I need help on the code for this problem with using string. Can someone give me the answer to this problem and on how you do it with explanation but most improtantly the answer. Thank you Method unscramble returns a version of String str with each pair of … |
|
Re:
write a algorithm in pseudocode for the procedure: input a person's age and salary. If the age is over 32, then add $1000 to the salary but otherwise subtract $500 from the salary. Finally, output the age and new salary: this is the question: here is the answer well the … |
|
Re:
Hello, I am having trouble sorting my array. I have gotten it to read out just the names in ABC order, but I need it to display all of the attributes. I have read several sites trying to figure out how to do it and I keep getting errors. Here … |
|
Re:
can someone help me or tell me why I am getting these errors. where I have gone wrong again public static void main(String[] args) { Scanner read = new Scanner (System.in); double taxable_income, income, tax, sum; System.out.println("Please enter taxable income"); taxable_income = read.nextDouble(); System.out.println("Please enter income"); income = read.nextDouble(); if(taxable_income … |
|
Re:
I have a program to write and keep getting syntax error but can't figure out what is the error, can somehelp me out here, any kind of help with it will be greatly appreciated. here is the program and what I have so far. this is the program: Write a … |
|
Re:
using Iteration for loop in java what would be the program to run a) 1!+2!+3!+4!+5! b) 1/1!+2/2!+3/3!+4/4!+5/5! c) 1/1!-2/2!+3/3!-4/4!+5/5! |
|
Re:
I'm fairly new to java, so forgive my incompetence. This program is pretty simple, I'm trying to take the string that a user inputs and return the vowels in the string. The error I'm getting is as follows: > VowelsA3.java:16: error: cannot find symbol > if (isVowel(letter) == true) > … |
|
Re:
Hello, I am having trouble with my inventory program. I made the first part last week and thought I did a good job. Come to find out I did not and the feedback I recieved from my instructor was not very helpful. Is there anyone that can help me fix … |
|
Re:
why do most people use brackets in this way when it comes to Java. Pospular IDEs also use this method by default class Test{ public void test(){ } } than this way class Test { public void test() { } } The second method is obviously easier to read. |
|
Re:
i read adapter classes everything is write but i am confuse about Listener Interfaces and Adapter classes concept priblem is that when java create adapter classes it implements corresponding interface and privide defination with empty bodies of all methods that are present in interface this is declaration public class WindowAdapter … |
|
Re:
Hi i am creating a lottery program and i have managed to get it so the user enters 6 numbers into the program then it will generate random numbers the problem is that the numbers the user enteres can be duplicate i need help trying to not make them duplicates.here … |
|
Re:
Hello, I am supposed to modify my last inventory program. Here is the instructions. Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of … |
|
Re:
hello i am a computer science student in my final year....please can someone help me wit the source code of an exper system on medical diagonosis in java. tank you |
|
Re:
I don't know what I am missing. Help me. import javax.swing.*; import java.util.Scanner; public class Operator { public static void main(String args[]) { String num1,num2,op; int ans; Scanner cin = new Scanner(System.in); num1 = JOptionPane.showInputDialog("Enter First Number"); op = JOptionPane.showInputDialog("Enter Operator"); num2 = JOptionPane.showInputDialog("Enter Second Number"); char c = (char) … |
|
Re:
i'm making a hospital management project using java and there is a small error "symbol not found ". plzz help |
|
Re:
I need to make this program GradeCalculator.java, and I can't figure out what is wrong with it. I'm really struggling, could someone please help! Thanks!! In the GradeCalculator.java program the user clicks the Enter button. The first input is a JOptionPane that asks the user, “Number of score to be … |
|
Re:
Here is problem: I ask user for how many dogs do you have user enter 5 i go via for loop and add the name into arraylist and now i want to display like 1. Java 2. is 3. fun and so more.... not just 3 after I want to … |
|
Re:
Hello, I am having trouble with how my program displays the items with a $ sign. I do not want a dollar sign and I ma not sure how it got there as I did not put one in. Is there a way to get rid of the $ sign … |
|
Re:
Hello java friends, I'm new to the concept of ArrayList and I want to solve this problem in my code. my main problem: I don't know how to sort itemA and itemB to appear only once then It will just add the total prices together. this is the behavior of … |
|
Re:
For a homework assignment in my intro to java class I was given the following problem: Write for, do-while, and while statements to compute the following sum and product 1. 1 + 7 + 25 + 79 + .... + (3^20 - 2) 2. 1 x 3 x 9 x … |
|
Re:
I trying to understand the ArrayList let say the user input in 1st Person Name : Alex Sex : M Dog Name: Java 2 Person Name: Joe Sex: M Dog Name: Is 3 Person Name: Anna Sex : F Dog Name: Fun in Arraylist how can you separate out from … |
|
Re:
i need to insert values into 3tables using storedprocedure and each tables should allows only 5rows. if one table filled with 5 rows remaining rows should be move to another table |
|
Hello. Im making an webapp using Eclipse Keppler. REQUIREMENTS: - Eclipse for Java EE (or JBoss Developer Studio 7 o 8) - JBossTools installed on eclipse - JBoss Aplication Server 7.1.1 (not eap) - MySQL connector J 5.33 Structure of project: i use this package structure - persistence and ejbdao … |
|
Re:
Hi, I m writing code to map single key(Integer) with array of values. But, its not giving the correct output. Here is the code: [CODE]import java.io.*; import java.util.*; class MapDemo{ public static void main(String args[]){ TreeMap<Integer, Object[]> tMap = new TreeMap<Integer, Object[]>(); Object[] vals = {"tree", "map", "sorted"}; tMap.put(1, vals); … |