Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,151,198 members, 7,811,523 topics. Date: Sunday, 28 April 2024 at 01:45 PM |
Nairaland Forum / Science/Technology / Programming / Please Post All Your Java Programing Questions Here. (4370 Views)
Get Your Java, C++, 3d Max, Photoshop, Computer Engineering Tutorials Here / How To Create A Simple Calculator Using Java Programing Language GUI / Post Ur Vb 6.0 Questions Here (2) (3) (4)
Please Post All Your Java Programing Questions Here. by blacksta(m): 2:10pm On Apr 18, 2009 |
To all java experts - can somebody please define abstractation and encapulation in java with examples - Thanks |
Re: Please Post All Your Java Programing Questions Here. by iceman2: 1:21pm On Apr 21, 2009 |
If you really want to learn stuff about java, i suggest u lay your hands on books like: thinking in java, or java how to program, They're available in pdf |
Re: Please Post All Your Java Programing Questions Here. by SayoMarvel(m): 4:57pm On Apr 21, 2009 |
Please can you send me the pdf version of java how to program? Prefarably the 7th edition but if that is not available, you can send me any other edition of the book. u can upload it or send it to my e-mail. marvelindaclub@yahoo.com |
Re: Please Post All Your Java Programing Questions Here. by linxon(m): 2:55pm On Apr 24, 2009 |
blacksta: Abstraction and Encapsulation are quite similar and confusing when you start oops programming, but heres my explanation: Abstraction means hiding the internal details and just exposing the ‘relevant’ functionality (i.e. the interface). For Example:-When you change the gear of your car, you know the gears will be changed without knowing how they are functioning internally. Now I have not coded in Java for about a year but from the top of my head: public interface GearBox { int gearOne(); int gearTwo(); int gearThree(); int gearFour(); int gearFive(); int reverse(); int neutral(); } Encapsulation refers to the transparency of an object - information hiding. By hiding the information inside an object we prevent a client from making unauthorized modifications, why? it makes code more robust. For example: public class NaijaCar extends Car implements GearBox { public NaijaCar() { //init code here } private double acceleration = 1.0; //Now implement the interface public int gearOne() { super.speed += acceleration; } public int gearTwo() { super.speed += acceleration * 2.0; } //And so on for gear 2,3 and 4 public int gearFive() { super.speed += acceleration * 5.0; } public int reverse() { super.speed -= acceleration; } public int neutral() { super.speed = 0.0; } } So you can see the Abstraction in the sense that users of NaijaCar use all mthe relevant gearbox methods without knowing the deatils of how each one works. some homework for you, where is the encapsulation in NaijaCar? |
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 4:50pm On Apr 24, 2009 |
As an object oriented programmer their are 4 principles or pillar you will need to understand and the rest is history Pillar #1: Encapsulation Pillar #2: Inheritance Pillar #3: Polymorphism Pillar #4: Abstraction - some argue you only have the 3 top pillars would anybody please give defination for the above - thanks also thanks to Linxon ( wonderful example) |
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 5:24am On May 06, 2009 |
Re: Please Post All Your Java Programing Questions Here. by candylips(m): 12:56pm On May 06, 2009 |
u bumped the thread right. in ur last post you listed 4 core oo principles. Just to add also that it is good oo practice to favor Encapsulation vs Inheritance cos it allows for very flexible oo designs |
Re: Please Post All Your Java Programing Questions Here. by Kobojunkie: 4:49pm On May 07, 2009 |
Abstraction is definitely an OOP basic. |
Re: Please Post All Your Java Programing Questions Here. by akinwunmi(m): 11:34pm On May 20, 2009 |
Helloooo am about using Netbeans for Java programming. I would like to know if its like Visual Basic.net. thanks |
Re: Please Post All Your Java Programing Questions Here. by bigboyslim(m): 12:43am On May 21, 2009 |
Abstraction - from the word abstract - meaning overview - As an analogy, when you read a technical document. There's always an abstract which gives a general overview of what the document is about. In Object Oriented programming, Abstraction gives the specification of an Interface. i.e it gives the Name of the interface and the names of all the methods in the interface but not the details. Any class that plans to implement that interface must use the specified methods. You make use of the specified methods but you supply the details in each method yourself. Encapsulation on the other hand refers to the fact that the when a user uses an object of a class, he has no ability to change the inner operations of the class methods and variables. That is the internal operations of the class is shielded protected or encapsulated. |
Re: Please Post All Your Java Programing Questions Here. by bigboyslim(m): 12:55am On May 21, 2009 |
Inheritance is the relationship between two classes that allows an object of one class called the sub class to use the methods already defined in another class called the super class. The syntax is Class Subclass extends Superclass For example Class Vehicle{ accelerate(); reverse (); changeGear(); } Class SUV extends Vehicle{ // no need to specify the accelerate(). reverse(); and changeGear() methods. (except during method overriding) } Class Vehicle is the superclass while class SUV is the subclass. Class SUV inherits the methods of class Vehicle, therefore if you create an object of Class SUV and make it inherit from class Vehicle, you can call the methods of the superclass Vehicle without having to define them in the SUV object. The primary purpose of inheritance is code reuse. i.e you don't have to keep defining methods for each object you create. |
Re: Please Post All Your Java Programing Questions Here. by candylips(m): 10:37am On May 21, 2009 |
akinwunmi: No where near as good as Visual Studio am afraid. |
Re: Please Post All Your Java Programing Questions Here. by hymnha(m): 3:50am On May 25, 2009 |
Hello. pls kindly assist me with this prob. I am introducing a password page to an application. But i'm stock in between pls cam somebody help me on how to go about it |
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 11:31pm On Jul 13, 2009 |
;d linxon: public class NaijaCar extends Car implements GearBox { public NaijaCar() { //init code here } private double acceleration = 1.0; //Now implement the interface public int gearOne() The field decleared private cant not be accessed by anyone outside of the class |
Re: Please Post All Your Java Programing Questions Here. by puskin: 3:26am On Jul 14, 2009 |
@blacksta Seeing U r a java programmer. I nid ur help. I am making a career change in2 programming, so I nid all d help I can get. I am hoping U nd others alike will b of assistance 2me. Pls, i wud b grateful if U cud assist me with some Java ebooks 4beginners nd also d compiler or U cud just paste d sites/links whr I can dwnld them 4rm. Thanks. |
Re: Please Post All Your Java Programing Questions Here. by Evagreenfields: 8:34am On Jul 14, 2009 |
Helo people.plx can i get d rough estimate of being a sun java certified programmer/developer and how long it takes to run the programme,all tins being equal.tanx |
Re: Please Post All Your Java Programing Questions Here. by zap2(m): 8:03am On Jul 17, 2009 |
@ iceman, pls how can i get pdf on how to progran java, pls send it to my netfreakz@gmail.com. tnx |
Re: Please Post All Your Java Programing Questions Here. by Evagreenfields: 9:02am On Jul 17, 2009 |
Pls anyone with useful info to my questn shld pls email me-evagreenfields@gmail.com |
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 12:04am On Jul 18, 2009 |
Evagreenfields: Are u talking about a self study route or Attending a college > |
Re: Please Post All Your Java Programing Questions Here. by Evagreenfields: 8:36am On Jul 18, 2009 |
Self study,@blacksta,i just want to read up java programming books and then sit 4 the programming exam, |
Re: Please Post All Your Java Programing Questions Here. by uche1(m): 12:26pm On Jul 27, 2009 |
Hello All @Blacksta, plz can u help me out with this assignment. How java handles graphic and example of simple program to effect it. post it here or u can send it to my mail bloomstech@yahoo.com waiting for ur reply. Thanks |
Re: Please Post All Your Java Programing Questions Here. by freeze1982: 3:02pm On Jul 27, 2009 |
hello moderator and all nairaland fan,i'm a graduate of mathematics/computer sci. After my graduation i decide 2 learn JAVA programming to boost my knowledge.but the language is difficult.i hav decide 2 pick it up,4rm 2moro.i need help my email is bluediva555@yahoo.com,pls if u hav any codes 2 assist me i'll be glad. |
Re: Please Post All Your Java Programing Questions Here. by kencas: 3:19pm On Jul 28, 2009 |
Data abstraction means hiding some data elements of a class from the public class Student { private String regNo; private String name; public void setRegno(String regNo) { this.regNo= regNo; } public String getRegno() { return regNo; } public void setName(String name) { this.name= name; } public String getName() { return name; } } Hoope this explains the concept |
Re: Please Post All Your Java Programing Questions Here. by celesto: 6:44pm On Jul 28, 2009 |
uche1: Familiarize yourself with the Java 2D API. It's a whole lot of package. You'll see lots of (hands-on) examples while learning!!! Visit http://www.corewebprogramming.com/PDF/ch10.pdf for Java 2D tutorial. |
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 10:20pm On Jul 29, 2009 |
JAVA BOOKS FOR DOWNLOAD Java Examples in a Nutshell, 3rd Edition By David Flanagan * Publisher: O'Reilly Media, Inc. * Number Of Pages: 720 * Publication Date: 2004-01-01 * ISBN-10 / ASIN: 0596006209 * ISBN-13 / EAN: 9780596006204 * Binding: Paperback Product Description: The author of the best-selling Java in a Nutshell has created an entire book of real-world Java programming examples that you can learn from. If you learn best "by example," this is the book for you. This third edition covers Java 1.4 and contains 193 complete, practical examples: over 21,900 lines of densely commented, professionally written Java code, covering 20 distinct client-side and server-side APIs. It includes new chapters on the Java Sound API and the New I/O API. The chapters on XML and servlets have been rewritten to cover the latest versions of the specifications and to demonstrate best practices for Java 1.4. New and updated examples throughout the book demonstrate many other new Java features and APIs. Java Examples in a Nutshell is a companion volume to Java in a Nutshell, Java Foundation Classes in a Nutshell, and Java Enterprise in a Nutshell. It picks up where those quick references leave off, providing a wealth of examples for both novices and experts. This book doesn’t hold your hand; it simply delivers well-commented working examples with succinct explanations to help you learn and explore Java and its APIs. http://w14.easy-share.com/1702920065.html
|
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 10:22pm On Jul 29, 2009 |
Thinking in Java By Bruce Eckel * Publisher: Prentice Hall PTR * Number Of Pages: 1098 * Publication Date: 1998-02-19 * ISBN-10 / ASIN: 0136597238 * ISBN-13 / EAN: 9780136597230 * Binding: Paperback Product Description: The legendary author Bruce Eckel brings Java to life with this extraordinarily insightful, opinionated and downright funny introduction. Thinking in Java introduces all of the language's fundamentals, one step at a time, using to-the-point code examples. More than virtually any other book, Thinking in Java helps you understand not just what to do -- but why. Eckel introduces all the basics of objects as Java uses them; then walks carefully through the fundamental concepts underlying all Java programming -- including program flow, initialization and cleanup, hiding implementations, reusing classes and polymorphism. Using extensive, to-the-point examples, he introduces error handling, exceptions, Java I/O, run-time type identification, and passing and returning objects. He covers the Java AWT, multithreading, network programming with Java -- even design patterns. The best way to understand the real value of this book is to hear what readers of the online version have been saying about it: "much better than any other Java book I've seen, by an order of magnitude, " "mature, consistent, intellectually honest, well-written and precise, " "a thoughtful, penetrating analytical tutorial which doesn't kowtow to the manufacturers, " "Thank you again for your awesome book. I was really floundering, but your book has brought me up to speed as quickly as I could read it!"For both beginner and experienced C and C++ programmers who want to learn Java. * From the basics of object development, all the way to design patterns and other advanced topics. * By the author of the best-selling Thinking in C++ -- winner of the 1995 Jolt Cola Award! * On-line version has already received tens of thousands of hits -- there's a huge built-in demand for this book! Download Links: Code: http://www.megaupload.com/?d=177J8HKO
|
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 10:24pm On Jul 29, 2009 |
Head First Java, 2nd Edition By Kathy Sierra, Bert Bates * Publisher: O'Reilly Media, Inc. * Number Of Pages: 720 * Publication Date: 2005-02-09 * ISBN-10 / ASIN: 0596009208 * ISBN-13 / EAN: 9780596009205 * Binding: Paperback Product Description: Learning a complex new language is no easy task especially when it s an object-oriented computer programming language like Java. You might think the problem is your brain. It seems to have a mind of its own, a mind that doesn't always want to take in the dry, technical stuff you're forced to study. The fact is your brain craves novelty. It's constantly searching, scanning, waiting for something unusual to happen. After all, that's the way it was built to help you stay alive. It takes all the routine, ordinary, dull stuff and filters it to the background so it won't interfere with your brain's real work--recording things that matter. How does your brain know what matters? It's like the creators of the Head First approach say, suppose you're out for a hike and a tiger jumps in front of you, what happens in your brain? Neurons fire. Emotions crank up. Chemicals surge. Download Links: Code: http://www.megaupload.com/?d=RBKQ55WY
|
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 10:27pm On Jul 29, 2009 |
If u need more books or certification exam notes let me know |
Re: Please Post All Your Java Programing Questions Here. by ikmomen(m): 1:25pm On Aug 20, 2009 |
@blacksta, pls can i get a book for newbie programmers |
Re: Please Post All Your Java Programing Questions Here. by blacksta(m): 1:37pm On Aug 20, 2009 |
ikmomen: Try the head first Java series very good for newbies |
Re: Please Post All Your Java Programing Questions Here. by candylips(m): 1:45pm On Aug 20, 2009 |
head first what of mouth first |
Advice On Game Development / Datagridview Export To Excel Vb.net / To Be a Whiz In Cybersecurity, Where Do I Start?
(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. 45 |