Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confusion

 
dharmin_desai
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,
If anybody have read JLS - Java Language Specifications !!!
Please tell me what is all about - Binary Compatibility (Chapter No - 13)
Is that included in the syllabus of SCJP ??
And basically what is that Binary compatibility ?
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, Binary Compatability will not be covered on the SCJP test.
It concerns when a compiled bytecode file may need to be recompiled, and when it does not need to be recompiled, in response to changes in classes that compiled file uses. For example, say a class Foo makes use of a class Bar. The programmer then makes changes to the source code in Bar, and recompiles Bar. At this point, Foo may or may not need to be recompiled, depending on the kinds of changes made in Bar.
That's what Binary Compatibility is talking about.
 
Rajinder Yadav
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JLS state that:
"To preserve binary compatibility, a class or interface should treat its accessible members and constructors, their existence and behavior, as a contract with its users."
What this mean is that any class member that is visible to other classes must not change, so variable names cannot change, function signature cannot change. But you are free to change or delete private members. You are also allowed to add new fields and methods, or modify the body of a function, and a few other things.
[ March 06, 2002: Message edited by: Rajinder Yadav ]
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dharmin,
Welcome to Javaranch
We'd like you to read the Javaranch Naming Policy and change your publicly displayed name to comply with our unique rule. Thank you for your cooperation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic