18 Posted Topics
Re: I think this is a homework problem.....I did the coding and the first 4 perfect numbers are: The perfect number is 6 The perfect number is 28 The perfect number is 496 The perfect number is 8128 Anyways, I will not give away the solution and rob you of your … | |
Hi guys, I need to pass a variable from a php page to another php page. There are two methods GET POST both involve user action like submitting by clicking a button or clicking a link How to send a variable without such user actions? | |
Hi. This is a homework question. I need to develop an RDP for algebraic expressions. like a+b+c*d/(h-g) etc the rules are: exp=exp(+|-)term|term term=term*factor|term/factor|factor factor=id|exp now the thing is that I created a few functions for exp, term, factor and I am able to successively and successfully separate all the terms … | |
I tried and succeeded in pulling out the info from the ms access database tables. But I am not able to pull out the images. They are in the text form. Is there any way to overcome this this is my code: [code] <html> <body> <%@ page import="java.sql.*,java.awt.Image" %> <% … | |
I am a bit familiar with java, but I am pretty ambitious and I want to build a simple book store. I need some suggestions and help. I can create a simple homepage using HTML which has links, navigation menu etc. on the homepage I am good at GUI programming. … | |
[code] public void init() { // Assign values to the rectanagle coordinates. // Add the MouseListener to your applet } public void paint(Graphics g) { // Rectangle's color g.setColor(Color.green); g.fillRect(rect1xco,rect1yco,rect1width,rect1height); g.setColor(Color.red); // When the user clicks this will show the coordinates of the click // at the place of the … | |
Hi Guys! Can you kindly run this code in your PC and see if are getting the correct output.... maybe there is something wrong with the path variable etc in my system... thanks I want to print numbers from 1 to 10 using two different Threads. The code below is … | |
Hi guys, I need to open a file and extract numbers from it. The numbers in the file are like this 12 34 23 12 00 10 02 12 22 33 10 12 09 03 03 93 etc I am able to extract the numbers in string format and store … | |
print ( "fred" gt "harvey" ); what does this print. How can we compare strings. If it was single characters, we can base our comparisons using ASCII. | |
I have to generate html files from .java files. I tried generating from eclipse but was stumped. there are just 4 files. Can somebody help me out. Send me a pm please!!! | |
I am not familiar with C code. I want to convert this code to C++ and run it any help is appreciated. [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> #include<cstdlib> using std::rand; using std::srand; #include <stdio.h> #include <stdlib.h> #include <time.h> /*Global Declarations */ /* define a new type KEY_TYPE as … | |
I am trying to execute this program, but I am getting errors this is the code [CODE] import java.util.*; public class DateUtils { static final int MILLS_IN_DAY = 24*60*60*1000; public static Date getCurrentDate() { GregorianCalendar currentDate = new GregorianCalendar(); currentDate.set(Calendar.HOUR,0); currentDate.set(Calendar.MINUTE,0); currentDate.set(Calendar.SECOND,0); return currentDate.getTime(); } public static Date createDate(int year, … | |
I am unable to execute these codes. This code is a replica from a website. I used Testing.java and Person.java. Should the files be named comparable.ex01.Testing.java and comparable.ex01.Person.java? As I am pretty new to java I have this doubt. [CODE] package comparable.ex01; import java.util.Arrays; import java.util.ArrayList; public class Testing { … | |
[CODE] import java.util.Scanner; public class testcircle { public static void main(String[] args) { System.out.println("welcome"); double i; Scanner sc = new Scanner(System.in); Scanner scan = new Scanner(System.in); String choice = y; while (i<=10) { while (choice.equalsIgnoreCase("y")); { System.out.println("Enter the Radius"); String radius=sc.next(); System.out.println("Enter the Object name"); String Object = scan.next(); if(Object.equalsIgnoreCase("circle")) … | |
[CODE]public abstract class CircleShape { public double radius; public CircleShape(){} public CircleShape(double radius) { this.radius=radius; } public void setradius(double radius){ this.radius=radius; } public String toString() { return "radius"+ radius; } abstract String getDisplayText(); } [/CODE] [CODE]public class circle extends CircleShape{ private double area; public double area() { return radius*radius*3.14; } … | |
Hi! this is a lengthy post/I hope its comprehensible basically this program should calculate and display the area of a circle.....but it shows area as 0.0 for every value of radius entered.......I would really appreciate it if someone helps! [CODE]import java.util.Scanner; public class circledriver { public static void main(String args[]) … | |
Hi, I formatted my pc and restored everything back and now I forgot how to install jdk and set the path. I am using windows vista..... I created a CLASSPATH in system variables as follows .;C:\Program Files\Java\jre1.6.0_02\bin and path in system variables as %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_12\bin and again a new path … | |
[code=Java]class Grade { public static void main (String args[]) { final int score = Integer.parseInt (args[0]); final char grade; if (score >= 90) { grade = 'A'; } else if (score >= 80) { grade = 'B'; } else if (score >= 70) { grade = 'C'; } else if … |
The End.