This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.matchlogger.match; | |
import pl.mmkay.matchlogger.team.Team; | |
import javax.persistence.*; | |
import java.time.LocalDateTime; | |
@Entity | |
@Table(name = "\"match\"") | |
public class Match { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.matchlogger.match; | |
import pl.mmkay.matchlogger.team.Team; | |
import javax.persistence.*; | |
import java.time.LocalDateTime; | |
@Entity | |
@Table(name = "match") | |
public class Match { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EnableOAuth2Sso | |
@Configuration | |
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter { | |
private static final Logger LOGGER = LoggerFactory.getLogger(WebSecurityConfiguration.class); | |
@Override | |
protected void configure(HttpSecurity http) throws Exception { | |
http | |
.csrf() | |
.disable() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Level15WhatDidIJustRemove { | |
public static void main(String... chars) { | |
List<Integer> happyLottoNumbers = new ArrayList<>(); | |
happyLottoNumbers.add(1); | |
happyLottoNumbers.add(Integer.valueOf(49)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
import java.util.Arrays; | |
public class Level14ArrayBinarySearch { | |
public static void main(String... chars) { | |
int[] elements = {6, 9, 1, 7}; | |
Arrays.sort(elements); | |
System.out.println(Arrays.binarySearch(elements, 6)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Level13ListFromArray { | |
public static void main(String... args) { | |
String[] typicalAndHealthyPolishFamily = { "Partner 1", "Partner 2", "Cat 1", "Cat 2"}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
public class Level12IsThisStringTheSame { | |
public static void main(String... args) { | |
String firstOne = "hello"; | |
String secondOne = "hello"; | |
String thirdOne = new String("hello"); | |
System.out.println(firstOne == secondOne); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
public class Level11IsThatAGoto { | |
public static void main(String... args) { | |
int[][] twoDimensionArray = {{1,2,3,4}, {5,6}, {7,8,9}}; | |
OUTER_LOOP: for(int[] innerArray : twoDimensionArray) { | |
INNER_LOOP: for(int i=0; i<innerArray.length; i++) { | |
System.out.print(innerArray[i]); | |
if (innerArray[i] == 5) { | |
break OUTER_LOOP; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
public class Level10WhatWillBeTheOutput { | |
{ | |
int dayOfWeek = 5; | |
switch(dayOfWeek) { | |
case 0: | |
System.out.println("Sunday"); | |
default: | |
System.out.println("Weekday"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package pl.mmkay.oca; | |
public class Level09SwitchOnLong { | |
public static void main(String[] args) { | |
long value = 0; | |
switch (value) { | |
case 0: | |
System.out.println(0); | |
break; | |
case 1: |
NewerOlder