• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock Question on Protocols

 
Xie Ruchang
Ranch Hand
Posts: 160
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which protocol exhibits all of the following properties?
* A method-invocation protocol
* Can connect to many languages on many platforms
* Moves objects (state and behavior) as arguments
A. HTTP
B. HTTPS
C. JRMP
D. IIOP
The correct answer is C.
Explanation as follows
Neither HTTP nor HTTPS are method-invocation protocols so A and B must be wrong. Both JRMP and IIOP can connect to legacy code created in a variety of languages, JRMP does so using JNI. However, IIOP moves state, but not behavior in method calls. JRMP can move whole objects including their behavior part. Therefore, C is the correct answer.
I think both the question and explanation do not make sense. JRMP and IIOP are protocols and what have protocol to do with programming languages? It is not JRMP that uses JNI, it is the Java code that uses JNI and at the same time uses JRMP.
Appreciate comments please.
 
Poornachandran R
Ranch Hand
Posts: 47
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are correct to some extend! Because, there are some protocols, that can be used only from specific languages, for example JRMP. Again, this can be used by other languages, by doing some EXTRA work (configuring JNI with JVM). So, I think, the basic objective of the question is to check, whether we know this or not.
 
parag bharambe
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
So what is a correct ans for this question ??
Parag
 
Xie Ruchang
Ranch Hand
Posts: 160
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parag,
Basically, I think that the question is faulty. This is one frustration in preparing for SCEA Part 1. Depending on which mock test and book, they can give different answers.
Best Regards,
PS : Be exam-smart, stick to the suggested answer. This question is from Cade book.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic