• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

only 8 days for exam.....

 
Ganeshkumar cheekati
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers...

i am going to take exam on janaury first week.

but still i have not completed mock exams in this site as well as master exams also.

which things i should read for these few days...?

i would be thankful if you can give suggestions?
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would suggest you that you focus on your weak areas. And Please give the Master Exam. It is very very very important. Other than that give as many mock exams that you can. This will help you a lot in the exam.

Best of luck Ganesh
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it is possible for you to give mocks, then first of all do that and jot down the topics you felt very week, read again from K&B or ask here. We are here to help you. If you do mocks, you can catch your problem area easily.

Make special notes within these days in any small diary that you can read any time, whatever the rule or concept you cannot remember jot down that in the diary, even some apis you can jot down like,
1. new Locale() is not possible, you have to write new Locale(language).
2. DateFormat.getInstance(Locale) is not valid, it is DateFormat.getInstance(style).
3. Calling static inner class using outer class instance is compiler error.
4. final Integer x4=8;
int i=8;
switch(8){
case x4://it is not valid
}
5.An array cannot be constructed without having a reference.
new int[]{1,2,3}; is not valid.
But if it was passed in argument to a method than it is valid.
6.File golden rules for widening, boxing, varargs.
five golden rule
7. String literals are not garbage collected.
String s="abc"; //it will not garbage collected.
8. Comparable is in java.lang package, Scanner in java.util and Console in java.io package.
9. Methods returing void cannot be called in System.out.println();
void method1(){}
System.out.println(method1()); is compiler error.
10. Object.hashCode() is a native method, same for getClass(), clone(), notify, notifyAll, and wait(long);
11. Keyword super is not valid at the generic declaration part of a method and a class.
public <V super K> A <V> useMe(A<V> k){}// here <V super K> is not valid.
class Aclass<V super K>{}//not valid.
12.
List<String> list=new ArrayList(); //will compile with warning.
List list=new ArrayList();//No warning here
List list=new ArrayList<String>();//no warning here
but
List list=new ArrayList();//no warning
list.add("abs");//warning here
13. Operator precedence in descending order:
precedence table
14. final + volatile not possible.
15. abstract + private is valid only for inner class.
16. abstract + strictfp only valid for classes not for methods.
17. for method local inner class only abstract and final modifier could be applied.
18. Reference of private inner class could be get outside the outer class but we cannot call any method on that reference.
19. anonymous class cannot have any static method.
20. static inner class cannot extend from regular inner class.
21. volatile, transient not allowed in interface.
22. Inner classes could have int and String only as final static member;

23. ArrayList has faster iteration than LinkedList.
24. LinkedHashMap maintains last access order, is slower than HashMap for adding and removing, and faster than HashMap for iteration.
25. Long v=4; is compile time error
26. There are no Thread.LOW_PRIORITY and Thread.HIGH_PRIORITY field, they are Thread.MIN_PRIORITY and Thread.MAX_PRIORITY.
27. goto and const is reserved keyword.
28. null preferes lowest in hierarchy
method(Object), method(Number), method(Integer)
calling with method(null) will call method(Integer)
but if any parameter outside the hierarchy like: method(String) then
calling method(null) is compiler error.

There are lots of, so take care and best of luck....
 
Abhi vijay
Ranch Hand
Posts: 509
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
25. Long v=4; is compile time error



why does that happen Punit, can you please explain?
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
25. Long v=4; is compile time error
because, 4 can also be interpreted as int , actually, in this statement it is interpreted as int.So its an error.

So it must be ,

Integer v=4;
or
Long v=4l;
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This happens Abhi due to rule no 2 of the 5 golden rules of widening, boxing and varargs. As widening + boxing not allowed, here int to be assigned to Long, compiler has to perform 1st widening then boxing, that is not allowed.
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I kind of hate to say this, but if there are one or two areas where you feel really weak it might be okay to skip those altogether in this last week. Since the questions are usually pretty evenly spread across the 30-something objectives you can whiff on one or two objectives and still be okay.

For instance, writing your own generics is pretty tough, but it's only one or two objectives. (Now USING generics is all over the place.)

hth,

Bert

p.s. Don't tell anyone I told you this strategy - Happy Holidays
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even these will also be not allowed.

short s=4;
Integer i=s;//error
Integer ii=Short.parseShort("4");//error
Integer i6=Byte.parseByte("4");//error
Integer iii=(short)4;//error line 1
Integer i4=(char)4;//error line 2
Integer i5=(byte)4;//error line 3




[ Edit : Modified line 1 to line 3 to give error, these are not giving error in eclipse IDE. But on command line these are giving errors.]
[ December 22, 2008: Message edited by: punit singh ]
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bert Bates:


p.s. Don't tell anyone I told you this strategy - Happy Holidays


 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Integer iii=(short)4;//allowed
Integer i4=(char)4;//allowed
Integer i5=(byte)4;//allowed

Are you sure these dont give error.
Because i am getting error as incompatable type
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which java version are you using James?

I compiled with java 5 and 6, there is no error.
But when I compiled with Java 1.4, it gave the error.
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using NetBeans , how do i find out the version??
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version you have installed in your machine ?
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\Program Files\Java\jdk1.6.0_03\bin>javac -version
javac 1.6.0_03



When compiled , this is the error,
ver.java:3: incompatible types
found : short
required: java.lang.Integer
Integer iii=(short)4;//allowed
^
ver.java:4: incompatible types
found : char
required: java.lang.Integer
Integer i4=(char)4;//allowed
^
ver.java:5: incompatible types
found : byte
required: java.lang.Integer
Integer i5=(byte)4;//allowed
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya on command line I am also getting the same error.
But on Eclipse IDE I am not getting any error, it is very strange!!!
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Eclipse editor is compiling this program and giving output 4 4 4, and on command line this program is not even compiling. Which side I should go ?
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the version which IDE is using. May be it is using different version.
May be help menu of the IDE would tell you about the version it is using :roll:
 
Punit Singh
Ranch Hand
Posts: 952
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think we should believe on command line, and conceptually also it should give compiler error as widening + boxing is not allowed.
 
Preethi Dev
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,

This applies same to my condition. i am having only 6 days to my exam.

Thanks to Punit and Bert...really good idea

Thanks
Preetha
 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
4. final Integer x4=8;
int i=8;
switch(8){
case x4://it is not valid
}

Why is this??
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look here
 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Best of luck Preetha and Ganesh . I know you will come out with flying colors...
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,

The exam was created with text editors (not IDEs), and tested from the command line - no IDEs were used, and we STRONGLY recommend that you NOT use IDEs to study for this exam.

hth,

Bert
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic