[VV4] jdbc, SpringBoot interview, react hook, scrum values, green concatenation, self-affirmation 6 Ps, IDE poll

[VV4] jdbc, SpringBoot interview, react hook, scrum values, green concatenation, self-affirmation 6 Ps, IDE poll

JAVA CERTIFICATION QUESTION: Database application with JDBC

Which two of the following statements are correct about JDBC?

  • A. A URL string must start with "jdbc".
  • B. A URL string must contain a database name.
  • C. The Class.forName method must be used to load a driver prior to JDBC 4.0
  • D. Using method Class.forName to load a driver as of JDBC 4.0 results in an exception
  • E. Username and password must always be specified when establishing a connection

Java trail ???https://lnkd.in/gZet8iaZ

Answer: A database connection URL is a string that your DBMS JDBC driver uses to connect to a database. It can contain information such as where to search for the database, the name of the database to connect to, and configuration properties. The exact syntax of a database connection URL is specified by your DBMS. The only requirement is that it's the form jdbc:[subprotocol]:[subname]. This means option A is correct while option B isn't. Option E is incorrect since username and password may not be required - it's database dependent. Using the Class.forName method to load drivers is a must prior to JDBC 4.0. This method isn't?required for JDBC 4.0+. However, doing so is harmless, and no exception is thrown. Therefore, option C is correct while option D isn't.

·? pu? ? s? ???su? ?????o? ???




?? Spring Boot Interview Questions

  • ????. What Is Spring Boot and What Are Its Main Features? ???? framework for rapid application development: starters, auto-config, actuator, security, logging.
  • ????. What Are the Differences Between Spring and Spring Boot? ??? Spring Boot makes configuring a Spring application a breeze.
  • ????. How Can We Set Up a Spring Boot Application With Maven? ???? Inherit from the spring-boot-starter-parent maven project.
  • ????. What Is Spring Initializr? ???? It creates a skeleton project for us.
  • ????. What Spring Boot Starters Are Available Out There? ???? There are over 50 starters: core, aop, jpa, security, test, web...
  • ????. How to Disable a Specific Auto-Configuration? ??? Exclude it: @EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class).
  • ????. How to Register a Custom Auto-Configuration? ???? Declare it in the EnableAutoConfiguration key in the META-INF/spring.factories file.
  • ????. How to Tell an Auto-Configuration to Back Away When a Bean Exists? ???? Use @ConditionalOnMissingBean annotation.
  • ????. How to Deploy Spring Boot Web Applications as Jar and War Files? ???? Add a plugin element to pom.xml: spring-boot-maven-plugin and set the packaging: <packaging>jar</packaging>.
  • ??????. How to Use Spring Boot for Command-Line Applications? ?? ???? Launch the main method of the class containing @SpringBootApplication like any classic Java class.
  • ??????. What Are Possible Sources of External Configuration? ???? We can use properties files, YAML files...
  • ??????.?What Does It Mean That Spring Boot Supports Relaxed Binding? ?? ?? It means a property myProp can be bound to any of these environment properties: myProp, my-prop, my_prop, or MY_PROP.
  • ??????. What is Spring Boot DevTools Used For? ?? ???? Applications using DevTools restart whenever a file on the classpath changes.
  • ??????.?How to Write Integration Tests? ???? With @SpringBootTest.
  • ??????. What Is Spring Boot Actuator Used For? ?? ???? It allows us to monitor and manage applications running in production.
  • ??????. Which Is Better to Configure a Spring Boot Project — Properties or YAML? ???? YAML
  • ??????.?What Basic Annotations Does Spring Boot Offer? ???? @EnableAutoConfiguration, @SpringBootApplication?
  • ??????.?How to Change the Default Port in Spring Boot? ??? Use a properties file or set server.port in the @SpringBootApplication class or in the command line: java -jar -Dserver.port=8081 myspringproject.jar.
  • ??????. Which Embedded Servers Does Spring Boot Support, and How to Change the Default? ????? Tomcat, Jetty, and Undertow, change it in the pom.xml.
  • ??????.?Why Do We Need Spring Profiles? ???? Spring has the provision of profiles to help separate the configuration for each environment

Src. ???https://lnkd.in/e-ecHmbG




QUOTE

No alt text provided for this image




REACT: What is a Hook? ??

Hooks were added to React in version 16.8. ?? Hooks allow function components to have access to state and other React features. ?? Because of this, class components are generally no longer needed.?? ???????? ????? ????????? ??????? ????? ??????????, ????? ??? ?? ????? ?? ?????? ??????? ???? ?????.

Hooks allow us to "hook" into React features such as state and lifecycle methods.??

EXAMPLE:

Here is an example of a Hook.

import React, { useState } from "react";
import ReactDOM from "react-dom/client";

function FavoriteColor() {
?const [color, setColor] = useState("red");

?return (
?<>
? <h1>My favorite color is {color}!</h1>
? <button
? type="button"
? onClick={() => setColor("blue")}
? >Blue</button>
? <button
? type="button"
? onClick={() => setColor("red")}
? >Red</button>
?</>
?);
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<FavoriteColor />);        

You must import Hooks from react. Here we are using the useState Hook to keep track of the application state. State generally refers to application data or properties that need to be tracked.

3 HOOK RULES

  • 1) Hooks can only be called inside React function components.??
  • 2) Hooks can only be called at the top level of a component.??
  • 3) Hooks cannot be conditional ?

????: ????? ???? ??? ???? ?? ????? ????? ??????????.

CUSTOM HOOK

If you have stateful logic that needs to be reused in several components, you can build your own custom Hooks.??

https://www.w3schools.com/REACT/react_hooks.asp




Scrum Values

Successful use of Scrum depends on people becoming more proficient in living five values:

Commitment?, Focus??, Openness??, Respect??, and Courage??


scrum values

The Scrum Team commits ? to achieving its goals and to supporting each other. Their primary focus ?? is on the work of the Sprint to make the best possible progress toward these goals ??. The Scrum Team and its stakeholders are open ?? about the work and the challenges. Scrum Team members respect ?? ♀? each other to be capable, independent people, and are respected as such by the people with whom they work. The Scrum Team members have the courage ?? ?? to do the right thing, and to work on tough problems.

These values give direction to the Scrum Team with regard to their work, actions, and behavior. The decisions that are made, the steps taken, and the way Scrum is used should reinforce ?? these values, not diminish or undermine them.

The Scrum Team members learn and explore the values as they work with the Scrum events and artifacts. When these values are embodied by the Scrum Team and the people they work with, the empirical Scrum pillars of transparency, inspection, and adaptation come to life building trust ??.

https://scrumguides.org/scrum-guide.html#scrum-values




?? ?? GREEN IT Developer:?Make the most of string concatenation

No alt text provided for this image



JavaScript generates temporary variables in the background when performing variable concatenation. Due to this, some syntax is more efficient than others and uses less RAM.



Instead of:

a += 'x' + 'y';
        

write:

a += 'x';
a += 'y';        

https://www.ecometer.org/rules/optimize-string-concatenation.html




SOFT-SKILL: the P's to SELF-AFFIRMATION ??? ??????? ?

How do you get yourself aligned with your wishes?

Do so by following the empowerment P's: Positive ?, Personal ??, Persistent ??, Powerful ??, Practical ???, Present Tense ?

No alt text provided for this image


1) POSITIVE ?

Keeping it to top positive. Your brain cannot understand the word no. Don't fail. Don't lose your money. Don't don't don't. The mind doesn't hear negatives. Well, so the first piece of positive self-talk is: "I want to keep it positive". Instead of I have to, I get to, I have to go to work. Negative that's doomed to fail. I have to lose weight. That's a negative. Instead, focus on the positive. I need to get into shape, I need to increase my energy, I need to eat well, not I can't have pizza, I can't have ice cream. So we want to create the first P: I want to be positive. I want to look for something good.

2) PERSONAL ??

The second P is to keep it personal. I want Bob to do such and such. I want the world to be fairer. Those aren't going to work. I can't control those but I can control myself. I want to be stronger. I keep it personal. Keep it about you. Don't make it about somebody else.

3) PERSISTENT ??

I want to be persistent. It becomes persistent by persisting every day. Are you a visual person ?? Put up pictures. Are you an auditory person ?? Make sure you say it here. So are you kinaesthetic ?? Talk to yourself about how things should feel.

4) POWERFUL ??

Well make it powerful but make it something you can really buy into. I can be dedicated to this. I can own it. It's important to me but I can BELIEVE it. If you can't believe it you will never achieve it. The everyday reinforcement with the persistence technics: It's going to strengthen you. It's going to happen.

5) PRACTICAL ??

Now let's add the next piece to the thing and make it practical. Is it something I really want? Is it something that's meaningful to me? Well, let's keep it practical. I want that vacation. Maybe I want that vacation to BALI maybe I want to have that practical image. Practical simply means in this context that I can believe it that I can buy into it.

6) PRESENT TENSE ?

And the last piece is simple it's present tense. Emotions and feelings are always in the here and now. If I make it in the future it will never occur. I want to change next year. The mind will wait until next year. I want to now. So what do you do? You tell yourself I am powerful. I am resourceful. I can achieve keep things in the present tense. Now if you take this set of these personal, persistent, positive, present, powerful, practical, and you use them on a regular basis you're going to find out that it's shifting the programming in your mind. You're becoming what you want to be.

GOING FURTHER ?? Positive self-talk:?https://lnkd.in/efAtbBxz




POLL RESULTS: Java devs, just a curiosity poll. What's your main IDE?

No alt text provided for this image




JOKE

Do you know why they name the Java language after an island???? Because it is above C. (sea)

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

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! ??…

社区洞察

其他会员也浏览了