32,204 Topics
| |
hey, could u help me with my java programming? i have this problem: Thanks a lot!!!! The mathematician Augustus De Morgan was aged 43 in the year 1849AD. This is interesting because 43 squared is 1849, ie, in 1849 his age was the square root of the year. Given that … | |
// Given that no person has ever lived longer than 123 years (and assuming that no one ever will), write a Java application that will determine if it is possible that anyone who is alive today is, has ever been, or will ever be alive in a year that is … | |
Hi, So for an assignment i had to read input from a file and then output it. The information in the file was in the following format: 1 line with a stock symbol and the next line with the quantiti bought. eg of a file that we'd use .ab 15 … | |
So after scanning a file, I am to format it and output it following these guidelines: -Lines are trimmed to remove any leading or trailing white space. Note that String has a method trim() that removes leading/trailing white space. A trimmed line is displayed with X leading spaces … | |
Frnds, My questions is "how come to know whether the number is even or odd without using %,/,bitwise operator". | |
Hi to everybody... Iam new to Webservices ..... Can anybody tell me two things ....... 1)What is the difference between the soap and rest webservices.. 2)Which one is more secure... Thanks in advance.... | |
Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product … | |
i have a problem in JDBC every thing is ok it shows this message `java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver` i already create DSN but but it stil show this error i do not know what i do My jdk is 64 bit and i create DSN of odbc 32 bit is any problem … | |
One of my assignments, that I already turned in, dealt with collecting a student's name and gpa, and storing the information in an array. Afterwards, we were asked to display the student's information in descending order based on their gpa. I was curious if anyone has any suggestions on improving … | |
I have 2d array that looks like this 0,7,0 7,3,3 8,0,3 I want to print such that the output looks like this(**in non hard-coding way**) 1st loop 0,7,0 7 8 2nd loop 0,7,0 3 0 3rd loop 0,7,0 3 3 4th loop 0 7,3,3 8 5th loop 7 7,3,3 0 … | |
I am currently developing a Simon says type game using jquery and javascript. I have linked a fully copy of the game on github Github download and unzip to see the game fully https://github.com/Jamiex304/Simon_Says_Game_Demo And I have reached a problem I want to add a timer that the player can … | |
I'm new to java and I'm working on a small android project using eclipse. I created a table and I want to populate it with data from a file. I have done this using EditText control shown below. public void AddRowItemTable(View view) { EditText itemid_Text= (EditText) findViewById(R.id.itemid); EditText itemname_Text=(EditText) findViewById(R.id.itemname); … | |
how to get the declared value from other java file and use it to another java file? like I want to show the user's real name using the textView when he/she successfuly login, from the main activity to the welcome page. example "Welcome User". I have tried this but it's … | |
public void log (){ if(start==null) System.out.println("List is empty.."); else{ Node temp=start; System.out.print("->"); //get rid of each user with a similar method but with a random user removed.... while(temp.next!=start ) { int r = rand.nextInt(2) ; if(r==0) { deleteAt(counter); System.out.println("Is Logged Off "+temp.data); } else if(r==1) { System.out.println("Is Logged on "+temp.data); … | |
I n a fictitious country of Ruritania, which is in a fictitious continent called Afrisia, the tax system is highly simplified. T hey have system where all taxes are converted to one single value and then the tax is applied according to the following rule(s) : if a person earns … | |
Hello, I'm using Netbeans with JDK 7. I'm developing a swing desktop application with embedded derby database. I'm using the following code. Statement stmt; try { Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); Connection conn = DriverManager.getConnection("jdbc:derby://localhost:1527/HelloWorld", "userid", "password"); stmt = conn.createStatement(); String sql = "INSERT INTO TABLEEMP " + "VALUES (" + Integer.parseInt(jTextField1.getText()) + ", … | |
Hey guys, I am facing a problem with one of my homeworks, it states: The various analyses implemented in the program analysis module will make use of a number of general data structures and algorithms and in this exercise we shall focus on those. The parser provides a representation of … | |
Hello to all first look this code class Square1 implements Runnable{ int a; public void run(){ a=10; } } class Square2 implements Runnable{ Square1 ob=new Square1(); public void run(){ System.out.println("Square Of this number is = "+(ob.a*ob.a)); } } class SquareThread{ public static void main(String args[]){ Thread t1=new Thread(new Square1()); Thread … | |
I've been working on a project I found on the Java Projects for learners thread. I've created a pokedex simulator that keeps track of pokemon. So far you can view a list of recorded pokemon, get more detailed info, add a pokemon, and it's all saved to files. However it's … | |
Hi all, consider below code: public class Bertha { static String s = ""; public static void main(String[] args) { int x=4; Boolean y = true; short[] sa = {1,2,3}; doStuff(x,y); doStuff(x); doStuff(sa,sa); System.out.println(s); } static void doStuff(Object o){ s += "1"; } static void doStuff(Object... o){ s += "2"; … | |
Hey guys, I'm trying to make an app where if I press a button an audio plays *I use android studio* The code compiles and all but, if I press the play button then the audio does not play..What am I doing wrong? Thanks! MyActivity.java package com.example.hayzam.bb; import android.app.Activity; import … | |
Create a class named Person that includes fields for last name, first name, and zip code. Include a default constructor that initialize last name, first name and zip code to ‘X’ if no arguments are supplied. Also include a display method, displayPerson() to display Person details. Create a test class … | |
I need help on this question :(. I cant seem to get the right output for this question. 5.25 (Compute pi) You can approximate pi by using the following series: p=4(1- 1/3 + 1/5 - 1/7 + 1/9 - 1/11..... +((-1)^i+1/2i-1) Write a program that displays the p value for … | |
Hi all i want to print * .. *** .... ***** In pyramid form please help.. | |
im recieving no erors but when im running it im also unable to see the mandelbrot it just displays the grey box, i understand there are other threads on this and i have attempted to use them but im currently stuck at this one point thanks for any help. using … | |
Hi thanks for reading this post. Hope you could help me. I have this question i can't figure out. Thanks in advanced for helping :) I kept receiving message dialog box containing "The document has no pages." whenever i click the PrintAllbutton. I used jasperreports, in which i'm not familiar … | |
Below is my queue code. Whenever I enter nos. 1 to 8, it will print 1-7 then replace 8 with 0. If there are any other mistakes in my code please let me know. import java.util.Arrays; import java.util.Scanner; public class Queue { private int[] elements; //integer values from scanner private … | |
Heya guys, i'm a newbie at java gui and trying to make a calculator using swing. Although i have made the calculator previously but this time i'm trying to add a menu bar also. The problem with the code is whenever i try to add menu bar without making the … | |
**I want to make a web filter app for java mobile??? ** what I need for making this ??? any one can give me any files of this project as class of web filtering...... In my project::: 1. this app will automatically detect the web filter word as adult content … |
The End.