Click here to Skip to main content
15,912,756 members
Home / Discussions / Java
   

Java

 
AnswerRe: JSF Pin
Richard MacCutchan31-Dec-12 0:54
mveRichard MacCutchan31-Dec-12 0:54 
AnswerRe: JSF Pin
Richard MacCutchan7-Jan-13 6:31
mveRichard MacCutchan7-Jan-13 6:31 
QuestionJSF with Tiles Pin
gurpreetsingh201531-Dec-12 0:12
gurpreetsingh201531-Dec-12 0:12 
AnswerRe: JSF with Tiles Pin
rkpandey201331-Dec-12 0:21
rkpandey201331-Dec-12 0:21 
AnswerRe: JSF with Tiles Pin
Richard MacCutchan31-Dec-12 0:54
mveRichard MacCutchan31-Dec-12 0:54 
QuestionAnnotation Pin
Vijay Kumar Jaiswal30-Dec-12 18:20
Vijay Kumar Jaiswal30-Dec-12 18:20 
AnswerRe: Annotation Pin
TorstenH.30-Dec-12 21:35
TorstenH.30-Dec-12 21:35 
AnswerRe: Annotation Pin
WebMaster2-Jan-13 22:14
WebMaster2-Jan-13 22:14 
AnswerRe: Annotation Pin
April Fans3-Jan-13 15:44
April Fans3-Jan-13 15:44 
AnswerRe: Annotation Pin
muthu shankar7-Jan-13 4:30
muthu shankar7-Jan-13 4:30 
AnswerRe: Annotation Pin
April Fans16-Jan-13 21:58
April Fans16-Jan-13 21:58 
QuestionCan some one port this java code to c#? Pin
Danish Samil25-Dec-12 23:28
Danish Samil25-Dec-12 23:28 
AnswerRe: Can some one port this java code to c#? Pin
TorstenH.27-Dec-12 23:56
TorstenH.27-Dec-12 23:56 
GeneralRe: Can some one port this java code to c#? Pin
Danish Samil30-Dec-12 22:46
Danish Samil30-Dec-12 22:46 
Questionwhy I have to use Pin
demo 225-Dec-12 17:47
demo 225-Dec-12 17:47 
Hi guys I need some one who really worked in series project to explain some concept


my teacher making a big story about private variable.

people always says we used private to make java hide the containing
.

Java
 package Student;


public class Student {

public static void main(String[] args) {


    information x = new information();
     x.ID();




{

Java
package Student ;

 
public class information{

         private  int ID=0;
         private string name="";
           private  int GPA =0;

         }


I know I can't change ID without using set and get but this my question


if I will use set and get I can make my life easy just make ID like this

Java
public int ID=0;



instead using set and get method.


my teacher said to protect the information from user !!!!!!!!


I don't why he said that ?

because user will see message like enter number and then the code will do calculation

like :

Please enter two Numbers :

5

4

The result : 9


So I still I don't know why I should use private which force me to use set and get .




please guys help me and remember I know this stupid question but I ask because I know how to use private but I don't why ?


before I just write this question I read and watch online youtube but there nothing I get


I'm a person who has only small memory takes only logical things and throw illogical thing.
AnswerRe: why I have to use Pin
Richard MacCutchan25-Dec-12 21:29
mveRichard MacCutchan25-Dec-12 21:29 
AnswerRe: why I have to use Pin
TorstenH.27-Dec-12 23:54
TorstenH.27-Dec-12 23:54 
GeneralRe: why I have to use Pin
demo 21-Jan-13 17:53
demo 21-Jan-13 17:53 
QuestionJava Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
100,00121-Dec-12 9:02
100,00121-Dec-12 9:02 
AnswerRe: Java Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
Richard MacCutchan21-Dec-12 23:03
mveRichard MacCutchan21-Dec-12 23:03 
GeneralRe: Java Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
TorstenH.22-Dec-12 1:23
TorstenH.22-Dec-12 1:23 
GeneralRe: Java Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
Richard MacCutchan22-Dec-12 1:31
mveRichard MacCutchan22-Dec-12 1:31 
GeneralRe: Java Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
TorstenH.22-Dec-12 1:42
TorstenH.22-Dec-12 1:42 
GeneralRe: Java Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
Richard MacCutchan22-Dec-12 1:53
mveRichard MacCutchan22-Dec-12 1:53 
GeneralRe: Java Netbeans Error Regarding Arraylist in BufferedWriter Method Pin
100,00122-Dec-12 13:12
100,00122-Dec-12 13:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.