Question: Java Project



Share on Google+Share on Google+

Ravi Khatri
Java Project
2 Answer(s)      7 years ago
Posted in : Java Beginners
View Answers

October 1, 2009 at 3:34 PM

Hi Friend,

Try the following code:

import java.util.*;

public class Computer{
static String name;
static int size;
static int speed;
static String make;
static double price;
static int quantity;
public Computer(String n,int s,int sp,String m,double p,int q){
public String getName(){
return name;
public int getSize(){
return size;
public int getSpeed(){
return speed;
public String getMake(){
return make;
public double getPrice(){
return price;
public int getQuantity(){
return quantity;
public void valid(){
System.out.println("Please enter price");
else if((quantity==0)||(quantity<0)){
System.out.println("Please enter quantity ");
public void displayData(){
List<Computer> list = new ArrayList<Computer>();
list.add(new Computer(name,size,speed,make,price,quantity));
for (Computer s : list){
System.out.println("Computer Name: "+s.getName()+ "\nRAM Size :"+s.getSize()+"\nProcessor Make: "+s.getMake()+"\nProcessor Speed: "+s.getSpeed()+"\nQuantity: "+s.getQuantity()+"\nTotal Price of Computers: "+s.getPrice());
public static void main(String[]args){
System.out.println("Enter details");
Scanner input=new Scanner(;;
Computer c=new Computer(name,size,speed,make,price,quantity);


April 23, 2010 at 4:40 PM

Hey are you doing MBA IT from symbisysy PUNE
coz i have the same question in my java project.

But this program is shoing error on the 50th line that [ or ( is expected.
but i m not able to solve it. coz i m not aware of java too much hepl plz


Related Tutorials/Questions & Answers:
Java Project
Java Project  Java project using with collection and generic with observer design pattern
java project
java project  how many tables are required in backend for online examination system project in jsp If backend is SQL
java project
java project  i would like to get an idea of how to do a project by doing a project(hospital management) in could you please provide me with tips,UML,source code,or links of already completed project with documentation
JAVA project
JAVA project  How to extract tags and their corresponding properties of a "cascading style sheet" file using JAVA
java project
java project  Connecting to MySQL database and retrieving and displaying data in JSP page by using netbeans
Java Project
Java Project  how to write a program for competitive exams(for student practice purpose)? for example: first student have to login after login then he has to select the particular exam what he want to write i.e the exam may
project - Java Beginners
project in Java  Need example project in Java
java project - Java Beginners
java project  how can i download the source code for the project college admission system
Java Project - Java Beginners
Java Project  Hey, thanks for everything your doing to make us better. Am trying to work on a project in java am in my first year doing software Engineering and the project is m end of year project. Am really believing
project detail - Java Beginners
project detail  Dear roseindia, i wnat to the idea for doing project in the java
Java Project - Java Beginners
Java Project  Hello Sir I want Mini Student Admission System project in java with Source Code and Back end Database is MS Access. plz Give That Sir its Very Very Urgent
java project - Java Beginners
java project  project for internet banking  Hi friend, I am sending you a link. This link will help you. Please visit for more information. Thanks
Java Project - Java Beginners
Java Project  I'm a III yr Engineering student. I've been ask 2 prepare a project on Java. Can u plz suggest me some topics ?   Hi friend... Java project topic with more information. 1. Asset Management 2. Shopping
project detail - Java Beginners
project detail  How to do project in java I am doing final MCA i want to do project I am willing to do project in java or j2ee. But I have no idea so I want some idea about project in java please give some sample project
JAVA PROJECT - Java Beginners
JAVA PROJECT  Dear Sir, I going to do project in java " IT in HR, recruitment, Leave management, Appriasal, Payroll" Kindly guide me about... etc. I am doing project first time. waiting for your reply, Prashant
JAVA AWT BASE PROJECT  suggest meaningful java AWT-base project
Java Project - Java Beginners
Java Project  Dear Sir, Right now i am working in java image processing project. In that i have to split in one image like Texture, color..., Please visit the following links:
java project - Java Beginners
java project  hi this amol i wish to do a project on banking software in java can u help   how can i help u .. and what the kind... adam certified java programmer certified websphere   ya sure!! what
java project - Java Beginners
java project  Can u pls suggest me any ideas for my B.E project? It's urgent... Front end---Java Back end----Oracle IDE---------Netbeans5.5 It should not be completely database oriented... I am not allowed to develop any
Project - Java Beginners
Project  Give me a sample project idea done using code Java
Project - Java Beginners
Project  Give me a sample project idea done using code Java
minor project in core java
minor project in core java  I am a student of BE IT branch 6sem ,i have to prepare a minor project in core java please sujest some topics other then management topics
java project - Java Beginners
java project  HAVE START A J2ME PROJECT WITH NO CLEAR IDEA .. ANY ONE... project titled, as ?M-News Application? is basically a mobile news application Project. In our project we are going to develop a Mobile Application which
Java Project - Java Beginners
Java Project  Dear Sir, I have to do Project in "IT in HR i.e. Recruitment, Leave Management, Appraisal & payroll. These are Four main modules... employee master. Now, can you tell in Java programming with Mysql How can
Java Project - Java Beginners
Java Project   Write a Java program to create simple Calculator for 4 basic Math operations, Addition, Subtraction, Multiplication and Division... the following link:
Java project ideas
Java project ideas  Hi, Can anyone tell me the java project ideas? I want to develop the project to learn java programming concepts in depth. Thanks   Hi, You can develop following types of applications: a) Hotel
project in java - JDBC
friend, i am sending java project link, visit following link http...project in java  hi, i should do a project that enables a local cable operator to manage his customers. this should be done in java plz send me
java project question
java project question  how to calculate bill extracting quantity n price from one database table and inserting the result into another in java   Hi Friend, Visit Here Thanks
java project - JavaMail
java project  i want to make a project in java on ethernet mailing system.....can you provide the source code of this?and give me more suggestions to make
Java project in Servlet
Java project in Servlet  Hi, I have one java (Servlet) project... have private network (LAN). So i want to run that project from any pc. Access to project should be from any syatem. Means can i access post 2 problems
JAVA Web project deployment
JAVA Web project deployment  Hi friends, I have created a website using servlet and JSP with SQL server on the backend. Now I have to deploy the project so that I can open the project and someone can work on it without installing
Java Spring Hibernate Struts Training Apache Commons ioutils maven dependency Read/Convert an inputStream to a String What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java Java Example Codes and Tutorials in 2017 How do I read a large file quickly in Java? Is learning Java worthwhile? How to create first Java Program? Retrieve database from the table dynamically in jsp from oracle using servlet What does core Java include?


Advertisement null