Click here to Skip to main content
15,921,660 members
Home / Discussions / Java
   

Java

 
GeneralRe: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 Pin
TorstenH.20-Oct-10 1:19
TorstenH.20-Oct-10 1:19 
GeneralRe: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 Pin
vidhyaej20-Oct-10 1:29
vidhyaej20-Oct-10 1:29 
QuestionClasses and methods Pin
vidhyaej19-Oct-10 21:28
vidhyaej19-Oct-10 21:28 
AnswerRe: Classes and methods Pin
Nagy Vilmos19-Oct-10 22:01
professionalNagy Vilmos19-Oct-10 22:01 
GeneralRe: Classes and methods Pin
vidhyaej19-Oct-10 22:58
vidhyaej19-Oct-10 22:58 
GeneralRe: Classes and methods Pin
Richard MacCutchan19-Oct-10 23:23
mveRichard MacCutchan19-Oct-10 23:23 
GeneralRe: Classes and methods Pin
vidhyaej19-Oct-10 23:41
vidhyaej19-Oct-10 23:41 
GeneralRe: Classes and methods Pin
TorstenH.19-Oct-10 23:27
TorstenH.19-Oct-10 23:27 
class A // class defintion - this is the name of the object called later
{
 int a; // variable - this is a member, your object will have this. it is not initialized! nullpointer-exception might pop up.

 A() // 0-argument-constructor is called by "A myObject = new A();" and sets the member to a value of 10.
 {
  this(10);
 }
 A(int x) // 1-argument-constructor has a argument, wich lets you take control of the member. it is called by "A myObject = new A(5);" and in THIS CASE sets the value of x to 5.
 {        // "A myObject = new A(32457);" will set the value of x to 32457.
  a=x;
 }
 public int somemethod(int value){ // some method, it will return the result from x * value it is called by "myObject.somemethod(2);"
    return (x*value);
 }


Try to make your work easier by giving full classified names to objects, members and methods. and formate the code. make comments - feel free to express you.

regards,
Torsten
I never finish anyth...

GeneralRe: Classes and methods Pin
vidhyaej19-Oct-10 23:43
vidhyaej19-Oct-10 23:43 
QuestionPaint problem in java Pin
tamash_ionut19-Oct-10 13:01
tamash_ionut19-Oct-10 13:01 
AnswerRe: Paint problem in java Pin
Nagy Vilmos19-Oct-10 22:03
professionalNagy Vilmos19-Oct-10 22:03 
AnswerRe: Paint problem in java Pin
TorstenH.19-Oct-10 23:12
TorstenH.19-Oct-10 23:12 
QuestionRe: Paint problem in java Pin
tamash_ionut20-Oct-10 10:45
tamash_ionut20-Oct-10 10:45 
AnswerRe: Paint problem in java Pin
TorstenH.21-Oct-10 23:00
TorstenH.21-Oct-10 23:00 
QuestionGlassfish Deployment error Pin
JDragon31415919-Oct-10 11:09
JDragon31415919-Oct-10 11:09 
AnswerRe: Glassfish Deployment error Pin
Richard MacCutchan19-Oct-10 23:17
mveRichard MacCutchan19-Oct-10 23:17 
AnswerRe: Glassfish Deployment error Pin
TorstenH.19-Oct-10 23:31
TorstenH.19-Oct-10 23:31 
GeneralRe: Glassfish Deployment error Pin
Richard MacCutchan20-Oct-10 1:24
mveRichard MacCutchan20-Oct-10 1:24 
QuestionProcessing JSP-Form using Servlet using AJAX Post method Pin
khurram_shahzad17-Oct-10 7:17
khurram_shahzad17-Oct-10 7:17 
Questionhelp required Pin
Nima Dorji15-Oct-10 5:30
Nima Dorji15-Oct-10 5:30 
AnswerRe: help required Pin
Richard MacCutchan15-Oct-10 6:00
mveRichard MacCutchan15-Oct-10 6:00 
QuestionSwing equivalent in java mobile Pin
trioum14-Oct-10 8:03
trioum14-Oct-10 8:03 
AnswerRe: Swing equivalent in java mobile Pin
Nagy Vilmos14-Oct-10 21:51
professionalNagy Vilmos14-Oct-10 21:51 
QuestionProblem in learning AJAX with PHP Pin
khurram_shahzad13-Oct-10 11:04
khurram_shahzad13-Oct-10 11:04 
AnswerRe: Problem in learning AJAX with PHP Pin
Richard MacCutchan13-Oct-10 11:43
mveRichard MacCutchan13-Oct-10 11:43 

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.