32,204 Topics
| |
How do i post my codes on here? I did it once by accident and don't remember how i did it. | |
This is just a simple program that acts as a calculator for school age children. My professor requested that I add a declarations section. If possible could someone help me which parts of my code I need to add. | |
I am a #rd yr. B.Tech student & want to do projects on C & Linux Shell Programming.It will be of great help if I can be supplied with some project titles for freshers with industry relevence. Thanking you, Supra | |
import java.util.*; public class n00883428 { public static void main(String[] args) { Scanner in = new Scanner(System.in); { int i; int j; int numPeople; int numCount; int upTo = 0; long memory; long startTime; long endTime; System.out.print("How many people are in the circle?"); numPeople = in.nextInt(); System.out.print("Enter number to count … | |
Hello, new to Java and I've been doing some coding for a few weeks. Right now I am stumped. I've been trying to make a program that would display how many days are in the month when the user inputs a month number, but it keeps saying that DaysInMonth.java:64: error: … | |
Hi Team, I have two java Files 1. Print (Package A) 2. Apple (Package B.C) (Jave file is inside C:\Z\A\B\C\ I have compiled and kept Print.class file inside C:\Z\A\B\A\ Now i have made a Jar file of Print.class named MyJar.jar and kept it in Z\A\ When i try to compile … | |
I'm not sure how to normalize the values to get the output that I want. I created a method called normalize. The values come from my txt file. The output I want is - Quizzes: 66% Labs: 88% Lab attendance: 81% Midterms: 91% import java.io.*; import java.util.*; public class FindGrade … | |
I am trying to finsih this coding and something is missing and teacher has asked me to init the doubles. I am struggling with the finishing touches of this program. import java.awt.*; import java.awt.event.*; import javax.swing.*; /** * The MenuWindow class demonstrates a menu system. */ public class CellPhonePackage extends … | |
I want to make a program to accept strings and make a pyramid of strings, but I cant make the right loop, I have the logic: But this seems to make only half- pyramid, can somebody help me with the right loop import java.util.Scanner; public class Stairs { public void … | |
Hi , i have done a project in servlet , i didn't get any error in the coding and console page . My problem is that datas are not added to the database. Below are my files. What i'm doing wrong ? StudentRegistration.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" … | |
Hi all - I am writing a program that uses two classes: One class is the InfixtoPostfix, which is actually the class that changes expressions from infix to postfix. (Example: ( A + B ) * ( C - D ) to A B + C D -*. The second … | |
Hi Team, Im preparing for OCJP and in one of the sample question is below Three version of MyClass.class exist on a file system 1. /foo/bar/ 2. /foo/bar/baz 3. /foo/bar/baz/bing And the system class path includes /foo/bar/baz And this is the command invoked from /foo java -classpath /foo/bar/baz/bing:/foo/bar MyClass Which … | |
I have a studied java and self taught on netbeans. i would like to use open source APIs and packages for writing heuristics and machine learning programs but dont know where to start. How to learn to use a new API ? Like genetic algorithm package or metaheuristic package? I … | |
my code: class A{ Vector<String> s = new Vector<String>(); } public class Vec { /** * @param args the command line arguments */ public static void main(String[] args) { A a = new A(); a.s.add("String1"); a.s.add("String2"); a.s.add("String3"); a.s.add("String4"); a.s.add("String5"); Vector<A> vecA = new Vector<A>(); vecA.add(a); System.out.println("Size of vector is "+vecA.size()); … | |
I am trying to get 20 images displayed on a jframe in jlabels using a gridlayout. I have added a while loop but still i am only am to see 1 image, please can you help me to display more than image in jlabels on a jframe? setSize(600, 600); setDefaultCloseOperation(HIDE_ON_CLOSE); … | |
hai to all iam decided to develop student information report so i decided to the gathering results from site and those converted to either .pdf or .xls file so i requested to code for to obtain the student reults from the any website thanking you sir | |
Im using hibernate and i tried to do the following session.get(Company.class, 1); After i executed the statement above i got this strange select statement generated by hibernate Hibernate: select company0_.Company_ID as Company1_31_4_, company0_.version as version2_31_4_, company0_.Address_ID as Address5_31_4_, company0_.Company_Code as Company3_31_4_, company0_.Company_Name as Company4_31_4_, company0_.Phone_ID as Phone6_31_4_, address1_.Address_ID as Address1_0_0_, … | |
Hi, could some one help me in resolving this issue. Below is the code in which i am trying to call open Calais API to extract the keywords from the content by using the lisence key. package com.clearforest; import java.rmi.RemoteException; import javax.activation.DataHandler; import javax.mail.internet.MimeMultipart; import javax.xml.rpc.ServiceException; public class CalaisDemo { … | |
Hey Guys, could you tell me the different ways to write throw method (Exception Handling) in a program.. I mean like we can write BufferedReader in many ways (2 ways so far i've studied).. eg; 1. BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); 2. BufferedReader br; { br = new BufferedReader(new InputStreamReader(System.in)); } | |
Assignment 1: Bank Account Class You are hired by a Canadian bank in order to develop a java application for processing withdraw and deposit transactions. The application enables staff of the bank to create new bank accounts, to process account transactions and to display the balance of a particular account. … | |
class A{ Vector<String> s = new Vector<String>(); } public class Vec { public static void main(String[] args) { A a = new A(); a.s.add("String1"); a.s.add("String2"); a.s.add("String3"); a.s.add("String4"); a.s.add("String5"); Vector<A> vecA = new Vector<A>(); vecA.add(a); System.out.println("Size of vector is "+vecA.size()); // here i am getting size one a.s.clear(); a.s.add("String6"); a.s.add("String7"); a.s.add("String8"); … | |
Should have the Menu: [1] Empty WaterGlass [2] Add Water [3] Remove Water [4] Display WaterGlass [5] Exit ** Note: The program will only end if the Exit Menu is chosen. java program Sample WaterGlass: Current Level: 10 *** --- --- --- --- --- --- --- --- --- --- *** … | |
I've created connection on java when I run the programe I get successful message , however in the service tab next to the project tab I can't see the my database connection under the database // inside method Connection connection = null; String url = "jdbc:oracle:thin@serverName"; string name ="test"; string … | |
Hello all, I was wondering on how I would extract a number out of a String after a specified character. For example, if String s = "22+5+35" , how can I extract and store the numbers 22,5, and 35 in a ArrayList? | |
When writing my code in Textpad, I get the following error when I go to compile it in Java... Tool completed with exit code 2. I need help - this is all very new to me. | |
The video tutorial for file handling in java is made by me, here is the link http://www.youtube.com/watch?v=MkAKrAXBP0A | |
Alright so I'm coding a Quadratic Equation Solver to help with my Math Class. However the teacher requires each calculation to be written out. I have the solver working, however I'm not sure where to start when it comes to printing each step. I know I will need to `System.out.println()` … | |
Hi, I am trying to a game, and i wanted to add my images to mysql. I have managed to save and retrieve the images. I have written a code which allows me to only retrive 1 image on my jframe in a jlabel from the database, i am a … | |
Heya! Okay, so I was able to register without using javascript. I am able to update my profile without javascript. I can login without javascript, and even send private messages without javascript. I can definitely make posts without javascript. Somewhat puzzlingly, I'm unable to *respond* to posts without javascript, which … | |
Can anyone help me to improve my code so i can add more than image to my sql database. The code i use is below: Connection connection = null; String connectionURL = “jdbc:mysql://localhost:3306/mydb”; ResultSet rs = null; PreparedStatement psmnt = null; FileInputStream fis; try { Class.forName(“com.mysql.jdbc.Driver”);//.newInstance(); connection = DriverManager.getConnection(connectionURL, “root”, … |
The End.