Christoffer Blyerts

Greenhorn
+ Follow
since Jun 03, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christoffer Blyerts

Congratulations! Nice score!

I have a question about the exam. On SpringSource site http://mylearn.vmware.com/mgrReg/plan.cfm?plan=31110&ui=www_cert following is stated:
Passing the exam demonstrates your understanding of Spring and validates your familiarity with:
Container-basics
Aspect Oriented Programming (AOP)
Data access and transactions
Spring model-view-controller (MVC)

However in the studyguide for the exam: http://mylearn.vmware.com/courseware/152239/core-spring-3.0-certification-study-guide.pdf
Topics like Remoting, Security, JMS and JMX are included. Are these topics included in the exam? I assume they are though they are in the class course material..

Regards,
Blyerts
Hi,

I think it is normal. I remember being in the same situation, 40-45% is good scores. The test in the K&B book are tuffer than in the real exam.
Passed the OCJP java 6 with a 74% score. Thanks for the help from people in this forum!
11 years ago
Hi,

In an abstract class i can have non-abstract methods.



How do i access this print function in the class that extends the abstract class a?

Thank you,

Christoffer
Hi,

i get a bit confused sometimes of when a variable changes value or not in a if statement, for example:



x will be equal to 2 after this if statement.



In this case x will be equal to 3.


What are the rules for when the variable value gets changed or not within a if statement?


Thanks,

Christoffer

Hi and thank you for your answers,
I finally got this now i think.

If i do the following changes:


t.makeArrayList2(new Animal2()) passes Animal2() to the method and the T is replaced with Animal(), that is correctly understood?
I dont think it is that clear with this syntax, that the T gets replaced with what i pass to the method....

Thanks for your help
Hi,

I am not really clear on how generic methods works. If i have the following code:


The first method public <T> List<T> makeArrayList(T t) i understand i think. When i call this method from main the return type will be of type List<Dog2>, because of the List<T>? And the <T> makes the method generic.
In the second method i state <T extends Animal2> so the list in the method can only be of something that extends Animal2? How would i correctly call this method? I know that this method probably doesent make any sence but i would like to know how ths second method would work.
My last question is why i can only have T extends in the return type declaration?


Thanks,

Christoffer
Thank you for your explanation! It helped me clear out my questions regarding classpath.
Hi and thank you for your response.
If i remove package com.foo from MyClass and remove the import statement from the B class it comiles using classpath .;com/foo B.java And i do not think it compiles because they are in the same package, the files are still in different folders. MyClass.class is in the C:\...\myProject\com\foo folder and B.class is in the myProject folder.

If i have the package declaration com.foo in myClass.java it will not comile using the same classpath, then i am getting bad source file com\foo\MyClass.java.
Hi,

I am trying to understand how and why to use the -classpath when compiling from the command promt. I am not clear on this part of the OCJP exam.

If have two classes, MyClass.java and B.java. B.java is in folder c:\...\myProject and MyClass.java in in folder c:\...\myProject\com\foo.

package com.foo;
public class MyClass {

public void hi(){}
}

import com.foo.*;
public class B {

public static void main(String[] args) {

System.out.println("hello");
MyClass m = new MyClass();
}
}

If I am in myProject folder and compile B.java it works fine. However if I remove import com.foo.*; and run javac - cp .com/foo B.java i get error bad class file com\foo\MyClass.class, why do i get this error?
If I remove package com.foo; from MyClass it works fine with the javac - cp .com/foo B.java command it works fine, why does it work when I remove the package statement?

Is the -cp supposed to be used when a class needs other classes but doesent import them?


I would be thankful for any help