Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,149,736 members, 7,806,011 topics. Date: Tuesday, 23 April 2024 at 10:12 AM

Java World: Questions And Solutions (java Only Pls) - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Java World: Questions And Solutions (java Only Pls) (3442 Views)

Some SEO Interview Questions And Answer / Programmer’s Writer’s Block: Causes And Solutions / NIIT Past Questions And Answers Available Now (2) (3) (4)

(1) (2) (Reply) (Go Down)

Java World: Questions And Solutions (java Only Pls) by javadevil: 11:36am On Apr 30, 2008
Hey guys, am a java programmer and would like to help beginners start a good career in Java Programming, Pls post you problems and projects here. I solve your problems and give you tips on doing your projects yourself. enjoy and welcome to the java world

1 Like

Re: Java World: Questions And Solutions (java Only Pls) by kaymi(f): 6:54pm On May 07, 2008
Thanks so much,

I am a Beginner and I have been trying to figure this out and I can't,

I have text books, I have ebooks and edocuments, but I seem not to be getting it, about writing codes, setting path, compiling and executing.

I really need your help. Are you residing in Lagos. I wont mind been taught practically, I have to get and understand this because I really need it.

Please come to my rescue.

Thank you
Re: Java World: Questions And Solutions (java Only Pls) by logica(m): 7:18pm On May 07, 2008
i don't know why people cannot understand that you cannot be taught how to program. if you cannot get it by yourself, please forget it and focus your energy on more useful and fruitful endeavors.
Re: Java World: Questions And Solutions (java Only Pls) by Bossman(m): 9:17pm On May 07, 2008
I responded in the thread below already. As for the syntax of the language, there are zillions of books online. However, as from learning to program, a lot is going to depend on you. Programming is not like most other subjects.  It's all about problem solving. You analyze a problem and you come up with ways to solve it. It also takes quite some time especially in the beginning.

In my opinion, it's like asking someone to teach you how to think.


https://www.nairaland.com/nigeria/topic-132535.0.html
Re: Java World: Questions And Solutions (java Only Pls) by X2X(m): 4:14am On May 10, 2008
kaymi:



I have text books, I have ebooks and edocuments, but I seem not to be getting it, about writing codes, setting path, compiling and executing.
. . . .

I you have books, etc and still cant figure out how to set classpaths or compile a simple class, then take the advice from Logica. Quit!
Re: Java World: Questions And Solutions (java Only Pls) by javaprince(m): 6:50pm On May 12, 2008
I need help in displaying Crystal Reports in Java and linking it to my database backend. I have tried to download iReports from JasperReport but am not sure how to use it yet.
Re: Java World: Questions And Solutions (java Only Pls) by logica(m): 7:04pm On May 12, 2008
@ "javaprince"

does the iReport download come with documentation or not? What site did you download it from? Doesn't the site have any documentation?
Re: Java World: Questions And Solutions (java Only Pls) by javadevil: 10:21am On May 13, 2008
sorry guys, have been down for a week, pls post you questions now
Re: Java World: Questions And Solutions (java Only Pls) by javadevil: 11:55am On May 13, 2008
X-2-X, pls ignore what logica has writen, you can be tot any programming language its just a matter of interest, about setting your classpath, pls follow the simple method below.

1. Right click on my computer
2. Select property
3 Select the advance Tab,
4. click on environment varible
5. Under System variables scroll to Path
6 Double Click on path, you will find value similar to this "%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
7 add a semicolon to the end ";" without d quotes;
8. browse to the directory where you installed your JDK, which is by default c:\programfiles\j2sdk1.6\bin,
8. copy the link to the bin directory and paste it after the semicolon you added in the system variables.

I hope that's quiet simple enough for a beginner, pls let me know if you have anyother problem.
Re: Java World: Questions And Solutions (java Only Pls) by javadevil: 11:59am On May 13, 2008
PLS NOTE ALL JAVA BEGINNERS! DO NOT RUSH WHEN YOU'RE READING ANY JAVA TEXT, ALL WAYS TRY TO TYPE THE CODE AS YOU READ, ITS VERY SLOW BUT EFFECTIVE. The Java Tutorial is a very Place to start. I don't advice starters to Use Thinking in Java by Bruce Eckel
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 8:24pm On May 13, 2008
just installed java on my laptop but its not compiling my codes! any body?
Re: Java World: Questions And Solutions (java Only Pls) by Bossman(m): 9:10pm On May 13, 2008
Exactly what do you mean by "it's not compiling my code" Is it because you have compilation errors or the Java compiler could not be found? When you type "Java" at the command prompt what do you see? Did you set your classpath as suggested in one of the several threads in this forum?

To get meaningful and more appropriate answers, I'd suggest you provide more details regarding the error you are getting.



lalaboi:

just installed Java on my laptop but its not compiling my codes! any body?
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 10:56pm On May 13, 2008
thats the point!  i dnt knw how to set my class path

i tried the step above and its still not compiling

like have got a code femi.java , in the command prompt i type in javac femi.java
and its telln me 'javac' is not a recognized smtn smtn
Re: Java World: Questions And Solutions (java Only Pls) by Bossman(m): 11:24pm On May 13, 2008
Type this 'java -version' at the command prompt and see if you get anything.

If you do, then at the command prompt type 'set classpath' and post the results here. If the above is ok, you may have a typo somewhere. The javac.exe is supposed to be in the bin directory, and you should be able to execute it from anywhere if the classpath is set correctly.
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 11:33pm On May 13, 2008
typed in the version and it showed me the version of my java

typed in set class path, result= environment variable class path not defined
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 11:36pm On May 13, 2008
this is the main thing in my variable value, is it corect?

C:\Program Files\PC Connectivity Solution\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Java\jdk1.6.0\bin
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 11:40pm On May 13, 2008
i av just added a comma to the end! according to the step above.

now a diff error appeared!

file not found, use help to do smtn smtn
Re: Java World: Questions And Solutions (java Only Pls) by Bossman(m): 12:00am On May 14, 2008
It should actually be a ; (semi colon) after the path settings. Add the semi colon, then type 'path' at the command prompt and verify that your entire path including the jdk path is there. Then try 'javac' at the command prompt.



lalaboi:

i av just added a comma to the end! according to the step above.

now a diff error appeared!

file not found, use help to do smtn smtn
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 1:25pm On May 14, 2008
its still not compiling!
Re: Java World: Questions And Solutions (java Only Pls) by kinswrld(m): 6:00pm On May 14, 2008
Hi fateful,i really like your effort you are put for we beginners of Java.My question i install Java 1.1 to my system.I written my Source files with word text and been save so i will want to run the program.The problem am have is what step am i going to take for the program to run.Thanks
Re: Java World: Questions And Solutions (java Only Pls) by Emma4dfuture(m): 6:28pm On May 14, 2008
Guys,tnx 4d educatn u're givin.1tin is,I live in an underdevelopd area,so it's hrd 4me2 get dis Java bks&cds.
Re: Java World: Questions And Solutions (java Only Pls) by Emma4dfuture(m): 6:38pm On May 14, 2008
I'll b most grtful if u can give me some sites 2dwnld dem/places where I cn getdem.My email:emmaforthefuture@hotmail.com
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 6:43pm On May 14, 2008
Re: Java World: Questions And Solutions (java Only Pls) by kinswrld(m): 12:34pm On May 15, 2008
Pls can someone help me with, I like to know what development tools i can use to start in learning Java because am really interested in this program actually have not been to any lecture on this but I do make use of the school library, there is much book I could make use of so. Pls for God sake what software can I use that I will understand easily as time goes on. And can a program run on non connected system? My email address is kinsworld21@yahoo.com or you could link me to a site or books that could solve my problem, I pray God will increase you wisdom as you help shear you knowledge with we the new ones. Thanks
Re: Java World: Questions And Solutions (java Only Pls) by kinswrld(m): 1:11pm On May 15, 2008
Pls can someone help me with, I like to know what development tools i can use to start in learning Java because am really interested in this program actually have not been to any lecture on this but I do make use of the school library, there is much book I could make use of so. Pls for God sake what software can I use that I will understand easily as time goes on. And can a program run on non connected system? My email address is kinsworld21@yahoo.com or you could link me to a site or books that could solve my problem, I pray God will increase you wisdom as you help shear you knowledge with we the new ones. Thanks
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 9:18am On May 16, 2008
anybody to help[?

my java is not compiling ohh!!!
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 6:56pm On May 16, 2008
its working now! grin grin
Re: Java World: Questions And Solutions (java Only Pls) by Bossman(m): 7:07pm On May 16, 2008
Good to know. where did you go wrong or what did you do differently? It may help others in a similar situation.

lalaboi:

its working now! grin grin
Re: Java World: Questions And Solutions (java Only Pls) by lalaboi(m): 9:15pm On May 17, 2008
the file location!
it was in my documents but was using another folder to to compile the file
that why i had the error 'file not found'

u get me?
Re: Java World: Questions And Solutions (java Only Pls) by javadevil: 1:53pm On May 19, 2008
Good day Java Guru's and Guru's to be. [color=#000099][/color] I'll like you to know that java programming is a very easy and poweful language, though I couldn't have said this when i started because I didn't find anybody to lead me in the right path, I gave up about 10 times but because of the love for the language I always came back.
To all Beginners, the most important thing is to have a passion for computers, A passion to solve problems, and then passion to write codes.

like I said in my earlier post, the java tutorial is a good place to start, dont forget to always type the codes as they come. it can be downloaded from sun's java website http://java.sun.com.

The JDK also can be downloaded from the same website.

pls follow the trail as it is displayed by the tutorial, after learning the Laguage core, you can then pick any techonology of your choice. I am a mobile developer but i could swich to any other cos I have a very good foundation with the basics.

Integrated Development Environment (IDE) is a very good tool but I personally dont advice beginners to start with it cos it hides the basics of the language from you.

I wish all you success as you take a dive into Programming.

I'll be here to always help you if you need any. pls post it here or mail or even call me. (adeiza@kaastechnologies.com///08059988889)

Thanks
Re: Java World: Questions And Solutions (java Only Pls) by Hardballer(m): 11:25pm On May 21, 2008
wld really appreciate help with this assignment im in a real fix


Write a complete address book maintenance application. The user of the program has three options: add new person, delete a person and modify the data of a person.
You have to decide how to allow the user to enter the values for a new person, and the other options.
You must use files in order to save and read the data.

Use the AddressBook class provided below.

the address book class
/*
Introduction to OOP with Java 4th Ed, McGraw-Hill

Wu/Otani

Chapter 10 Sample Program: Address Book Maintenance

File: AddressBook.java
*/

/**
* This class is designed to manage an address book that contains
* Person objects. The user can specify the size of the address book
* when it is created. If no size is specified, then the default size
* is set to 25 Person objects.
*
* @author Dr. Caffeine
*
*/
class AddressBook { //Step 4: Implement the delete method


//--------------------------------
// Data Members
//--------------------------------

/**
* Default size of the array
*/
private static final int DEFAULT_SIZE = 25;

/**
* Constant for signaling an unsuccessful search
*/
private static final int NOT_FOUND = -1;

/**
* The array of Person objects
*/
private Person[] entry;

/**
* The number of elements in the <code>entry</code> array,
* which is also the position to add the next Person object
*/
private int count;

//--------------------------------
// Constructors
//--------------------------------

/**
* Default constructor.
* Creates an address book of size 25.
*/
public AddressBook( ) {
this( DEFAULT_SIZE );
}


/**
* Creates an address book with the designated size.
*
* @param size the size of this address book.
*/
public AddressBook( int size ){
if (size <= 0 ) {
throw new IllegalArgumentException("Size must be positive."wink;
}

entry = new Person[size];

//System.out.println("Array of "+ size + " is created."wink; //TEMP
}


//-------------------------------------------------
// Public Methods:
//
// void add ( Person )
// void delete ( String )
// Person search ( String )
//
//------------------------------------------------

/**
* Adds a new Person to this address book.
* If the overflow occurs, the array size
* is increased by 50 percent.
*
* @param newPerson a new Person object to add
*/
public void add( Person newPerson ) {

assert count >= 0 && count <= entry.length;

if (count == entry.length) { //no more space left,
enlarge( ); //create a new larger array
}

//at this point, entry refers to a new larger array
entry[count] = newPerson;
count++;
}


/**
* Deletes the Person whose name is 'searchName'.
*
* @param searchName the name of a Person to delete
*
* @return true if removed successfully; false otherwise
*/
public boolean delete( String searchName )
{
boolean status;
int loc;

loc = findIndex( searchName );

if (loc == NOT_FOUND) {
status = false;
} else { //found, pack the hole

entry[loc] = entry[count-1];

status = true;
count--; //decrement count,
//since we now have one less element
assert count >= 0 && count <= entry.length;
}

return status;
}

/**
* Searches this address book for a Person
* whose name is <code>searchName</code>.
*
* @param searchName the name to search
*
* @return a Person object if found; otherwise null
*/
public Person search( String searchName ) {
Person foundPerson;
int loc = 0;

while ( loc < count &&
!searchName.equals( entry[loc].getName() ) ) {
loc++;
}

if (loc == count) {

foundPerson = null;
} else {

foundPerson = entry[loc];
}

return foundPerson;
}

//-------------------------------------------------
// Private Methods:
//
// void enlarge ( )
//
//------------------------------------------------

/**
* Enlarges the size of <code>entry</code> array to
* eliminate the overflow condition. The new array
* is 50 percent larger than the current array.
*/
private void enlarge( ) {
//create a new array whose size is 150% of
//the current array
int newLength = (int) (1.5 * entry.length);
Person[] temp = new Person[newLength];

//now copy the data to the new array
for (int i = 0; i < entry.length; i++) {
temp[i] = entry[i];
}

//finally set the variable entry to point to the new array
entry = temp;

System.out.println("Inside the method enlarge"wink; //TEMP
System.out.println("Size of a new array: " + entry.length); //TEMP
}

/**
* Finds the index in the array where <code>searchName</code>
* is the name of a person to locate.
*
* @param searchName the name of person to find
*
* @return the index of the found Person in the array; NOT_FOUND
* if the searched person is not found
*/
private int findIndex( String searchName ) {
int loc = 0;

while ( loc < count &&
!searchName.equals( entry[loc].getName() ) ) {
loc++;
}

if (loc == count) {

loc = NOT_FOUND;
}

return loc;
}
}

please mail me at [email]push_thetempo@hotmail.com [/email]
Re: Java World: Questions And Solutions (java Only Pls) by Bossman(m): 11:54pm On May 21, 2008
Exactly what part do you need hep with? It looks like you were provided with a good portion of what you need. What have you tried to do and are having difficulty with?

(1) (2) (Reply)

My Blog Pictures Will No Longer Show On Facebook. / Is Node.js A Future??? / Leetcode Solution Error Please Help Its Just Driving Me Crazy

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 48
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.