[VV12] generic inheritance, dependency injection, techlead test, inspection pillar, green operation, self-talk, top paying languages

[VV12] generic inheritance, dependency injection, techlead test, inspection pillar, green operation, self-talk, top paying languages

JAVA CERTIFICATION QUESTION:?Generic Collections and inheritance

Given:

List<Number> l = new ArrayList<Long>(); // Line 1

l.add(0); // Line 2        

What happens when compiling and executing the given code?

* Compilation fails on line 1

* Compilation fails on line 2

* ClassCastException is thrown on line 1

* ClassCastException is thrown on line 2

* No compile-time or runtime error occurs

#java?#certificationquestion?#ocp

?? Answer:

Despite the fact that Number is a supertype of Long, the parameterized types List and ArrayList have no relationship.

The assignment on line 1 is therefore between incompatible types, which results in a compile-time error.

(ArrayList<Long>() does not inherit from List<Number> while Long inherits from Number).

So' Compilation fails on line 1' is correct.



???? SPRING CERTIFICATION QUESTION: What is dependency injection and what are the advantages?

???????????????????? ?????????????????? ?? is a design pattern that implements ?????????????????? ???? ?????????????? (??????) design principle, whereby objects only define their dependencies letting some other code to ???????????? those dependencies during object creation. That is why this process is called an inversion: an object doesn't control ??? instantiation of its dependencies.

There are several dependency ?????????????????? ??????????:

1. Constructor ?? ♂? injection - dependencies are provided through a constructor.

2. Setter ?? injection - dependencies are provided through an exposed setter method.

3. Field ?? injection - dependencies are injected directly in the field, with no constructor or setter method. In Java language field injection is performed with the help of 'magical' reflection ?? technology, so even private fields can be populated in that way.? Fields have to be annotated with the ?????????????????? annotation to become field injection candidates.

4. Interface ?? injection - dependencies are provided through an exposed setter method of the implemented interface.

5. Method ?? injection - dependencies are provided from overridden methods of container-managed bean.

Dependency injection ???????????????????? are the following:

1. Code is cleaner ?? (object configuration details are externalized)

2. Decoupling decreases ?? between an object and its dependencies

3. Code is easier to test ?? using stubs or mocks

4. Facilitating single 1?? responsibility principle

Dependency injection ?????????????????????????? are the following:

1. Increased ?? number of classes

2. Creation of unnecessary ?? ♂? interfaces

#spring?#certificationquestion?#vcp

All Dependency Injection Types (PDF)?? hhttps://lnkd.in/eigTb3ar




QUOTE

No alt text provided for this image




TECH LEAD: How Good Are Your Leadership Skills?

No alt text provided for this image

Do the following free assessment (5min-18questions), to check your leadership skills.

QUIZ HERE???https://lnkd.in/eNpeFAf3

I did it, I scored 68/100. ??

The passing score is 53.

So I have got what it takes to lead.

My leadership traits are:

??Strengths: emotional intelligence, motivating people to deliver the vision, and providing support and stimulation.

??Weakness: managing performance effectively.

So there is the enthusiasm ??, but the verification of task completion ?? could be better.

And you? Share in the comments if you feel it ??

#free?#softskill?#test?#techlead

https://lnkd.in/eNpeFAf3




SCRUM: Scrum pillar Inspection ???

The Scrum artifacts and the progress toward agreed goals ?? must be inspected frequently and diligently to detect potentially undesirable variances or problems??. To help with inspection, Scrum provides cadence in the form of its five events 5??.

Inspection enables adaptation ???. Inspection without adaptation is considered pointless??. Scrum events are designed to provoke change.




GREEN IT Developer ????: Use primitive operations

Using methods for basic operations uses additional system resources. The interpreter must first resolve the objects and then the methods just to run the simplest of operations.

Therefore, avoid them as much as possible.

Instead of:

var min = Math.min(a,b);
A.push(v);        

write:

var min = a < b ? a : b;
A[A.length] = v;        




SOFT-SKILL: Be Aware of your Self-talking ?????

?? Spot negative self-talking and prune those negative thoughts

No alt text provided for this image

Once upon a time, we told people that if they talked to themselves, they were crazy ??.

Nowadays, more and more people ?????????? ???? ?? talk to themselves.

You talk to yourself ?? much more than anybody else does.

Regularly, you're telling yourself about the things you can do ?.

You're scheming ???? your future.

You're also talking to yourself about past regrets ??.

And it is this last point that you should be aware of ??.

  • Well, we often wind up telling ourselves the wrong things ?.
  • We go the wrong way ?.
  • We discourage ourselves ?.
  • We tell ourselves that it's best not to try to do X ?.
  • We're going to fail ?.
  • We're going to waste our time ?.
  • We've got to make a fool of ourselves ?.
  • We discourage risk-taking ?.

I have such thoughts when I have opportunities for new relationships, either in business or leisure.

I say to myself, it is a loss of time ?, it is not worth the effort ??, and it will be again a bad experience ??.

But the point is to continue experimenting until you get it right ??.

Unfortunately, neuroscience ?? has indicated that up to about 75 percent of those inner dialogues are negative ??.

So the tip is to detect ?? when you self-talk badly and prune ?? out these negative thoughts.

Self-manage you ?? ! Create an active, positive ?? dynamic dialogue that encourages and supports what you want, what you can do, and where you want to succeed!




SURVEY: What is your current total compensation (salary, bonuses, and perks, before taxes and deductions)??

No alt text provided for this image

  1. Clojure programmers have the highest paycheck.
  2. Java programmers are not in the top of those with the highest paycheck.
  3. PHP programmers are among those who have the lowest paycheck.




DBA PUN

A new database query walks into a bar. The server says: "Sorry, cache only!"

(Cash??Cache: memory storage. Whenever a query is run for the first time in SQL Server, it is compiled and a query plan is generated for the query. Then, it can be saved in the cache. So here the database query could not be in the cache because it is new, that's why it can't have a drink?? )

要查看或添加评论,请登录

Vincent Vauban的更多文章

  • ?? Broken Function Level Authorization – API5:2023 ??

    ?? Broken Function Level Authorization – API5:2023 ??

    I'm kicking off a series of articles on API Security ?? to help us—developers ????????—better understand and implement…

  • [VV112] The Java 21 Newsletter

    [VV112] The Java 21 Newsletter

    ????2??1?? Dear followers, let's prepare for Java 21 certification together! 1?? How would you answer this question:…

  • FR Les mots sans les maux. ???

    FR Les mots sans les maux. ???

    FR Hier, j’ai eu la chance d’assister à un atelier sur la Communication Non Violente (CNV) avec les superbes people de…

  • ?? Unrestricted Resource Consumption – API4:2023 ??

    ?? Unrestricted Resource Consumption – API4:2023 ??

    I'm kicking off a series of articles on API Security ?? to help us—developers ????????—better understand and implement…

  • ?? Broken Object Property Level Authorization – API3:2023 ??

    ?? Broken Object Property Level Authorization – API3:2023 ??

    I'm kicking off a series of articles on API Security ?? to help us—developers ????????—better understand and implement…

  • [VV111] The Java 21 Newsletter

    [VV111] The Java 21 Newsletter

    ????2??1?? Dear followers, let's prepare for Java 21 certification together! 1?? How would you answer this question:…

    18 条评论
  • ?? Broken Authentication – API2:2023 ??

    ?? Broken Authentication – API2:2023 ??

    I'm kicking off a series of articles on API Security ?? to help us—developers ????????—better understand and implement…

  • ?? BOLA – The #1 API Security Threat (API1:2023)

    ?? BOLA – The #1 API Security Threat (API1:2023)

    I'm kicking off a series of articles on API Security ?? to help us—developers ??????????—better understand and…

  • [VV110] The Java 21 Newsletter

    [VV110] The Java 21 Newsletter

    ????2??1?? Dear followers, let's prepare for Java 21 certification together! 1?? How would you answer this question:…

  • ?2??4?? Java 24 features with Thiago

    ?2??4?? Java 24 features with Thiago

    (Thanks Thiago Gonzaga ) Here are some insights based on Thiago X content. Java 24: JEP 491 Boosts Virtual Threads! ??…

社区洞察

其他会员也浏览了