Click here to Skip to main content
15,893,588 members
Home / Discussions / Java
   

Java

 
QuestionRe: structure equivalant in java Pin
David Crow7-Oct-10 10:00
David Crow7-Oct-10 10:00 
QuestionAlarm Clock Help Pin
Autunmsky224-Oct-10 17:32
Autunmsky224-Oct-10 17:32 
AnswerRe: Alarm Clock Help Pin
Richard MacCutchan4-Oct-10 22:09
mveRichard MacCutchan4-Oct-10 22:09 
AnswerRe: Alarm Clock Help Pin
TorstenH.5-Oct-10 3:08
TorstenH.5-Oct-10 3:08 
Questionkey word 'this' Pin
Tichaona J1-Oct-10 5:32
Tichaona J1-Oct-10 5:32 
AnswerRe: key word 'this' Pin
Nagy Vilmos1-Oct-10 5:41
professionalNagy Vilmos1-Oct-10 5:41 
GeneralRe: key word 'this' Pin
Luc Pattyn2-Oct-10 14:28
sitebuilderLuc Pattyn2-Oct-10 14:28 
AnswerRe: key word 'this' Pin
Neo101011-Oct-10 12:45
Neo101011-Oct-10 12:45 
The keyword 'this' refers to the current class you are in.
If you write 'this.' while in a class, you can access all members
of that class by IntelliSense.
'this' just means 'the current class'. Sounds logical, yes?

public class MyClass
{
private int age = 18;

public MyClass
{
this.age = 20;
}
}

However, 'this' can be omitted.
'this.age' is the same as 'age'
while in the same class.

Regards,
CSTreval
AnswerRe: key word 'this' Pin
Dave Doknjas2-Oct-10 13:31
Dave Doknjas2-Oct-10 13:31 
AnswerRe: key word 'this' Pin
jwintermute5-Oct-10 5:11
jwintermute5-Oct-10 5:11 
AnswerRe: key word 'this' Pin
RaviRanjanKr8-Nov-10 17:51
professionalRaviRanjanKr8-Nov-10 17:51 
Questionprinting jtextpane silently Pin
ndiga29-Sep-10 22:58
ndiga29-Sep-10 22:58 
AnswerRe: printing jtextpane silently Pin
TorstenH.5-Oct-10 3:13
TorstenH.5-Oct-10 3:13 
Questionprinting multiple items on the same paper Pin
ndiga29-Sep-10 22:56
ndiga29-Sep-10 22:56 
Question"missing return statement" error [Solved] Pin
Skippums29-Sep-10 8:33
Skippums29-Sep-10 8:33 
AnswerRe: "missing return statement" error Pin
Skippums29-Sep-10 9:25
Skippums29-Sep-10 9:25 
AnswerRe: "missing return statement" error Pin
Luc Pattyn29-Sep-10 10:06
sitebuilderLuc Pattyn29-Sep-10 10:06 
QuestionXml beans problem Pin
Stephen Lintott29-Sep-10 5:10
Stephen Lintott29-Sep-10 5:10 
QuestionImmutability compromised if 'final' is omitted? Pin
Neo1010127-Sep-10 7:50
Neo1010127-Sep-10 7:50 
AnswerRe: Immutability compromised if 'final' is omitted? Pin
DaveAuld27-Sep-10 8:37
professionalDaveAuld27-Sep-10 8:37 
AnswerRe: Immutability compromised if 'final' is omitted? Pin
DaveAuld27-Sep-10 9:47
professionalDaveAuld27-Sep-10 9:47 
AnswerRe: Immutability compromised if 'final' is omitted? Pin
Nagy Vilmos29-Sep-10 1:21
professionalNagy Vilmos29-Sep-10 1:21 
QuestionConflicts with a scope too wide? Pin
Neo1010127-Sep-10 7:48
Neo1010127-Sep-10 7:48 
AnswerRe: Conflicts with a scope too wide? Pin
TorstenH.28-Sep-10 0:04
TorstenH.28-Sep-10 0:04 
GeneralRe: Conflicts with a scope too wide? Pin
David Skelly28-Sep-10 0:18
David Skelly28-Sep-10 0:18 

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.