mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-26 00:31:39 +03:00
[java/en] Fix mix usage of spaces and tabs as indents (#5024)
This commit is contained in:
parent
6acd121c96
commit
810ab009d5
@ -126,8 +126,8 @@ public class LearnJava {
|
||||
// <name1> = <name2> = <name3> = <val>
|
||||
int barInt1, barInt2, barInt3;
|
||||
barInt1 = barInt2 = barInt3 = 1;
|
||||
// Shorthand for multiple declarations
|
||||
int barInt4 = 1, barInt5 = 2;
|
||||
// Shorthand for multiple declarations
|
||||
int barInt4 = 1, barInt5 = 2;
|
||||
|
||||
|
||||
/*
|
||||
@ -310,8 +310,8 @@ public class LearnJava {
|
||||
///////////////////////////////////////
|
||||
System.out.println("\n->Operators");
|
||||
|
||||
int i1 = 1, i2 = 2;
|
||||
|
||||
int i1 = 1, i2 = 2;
|
||||
|
||||
// Arithmetic is straightforward
|
||||
System.out.println("1+2 = " + (i1 + i2)); // => 3
|
||||
System.out.println("2-1 = " + (i2 - i1)); // => 1
|
||||
@ -543,7 +543,7 @@ public class LearnJava {
|
||||
// is called when the anonymous inner class is created.
|
||||
// This does not only work for Collections, it works for all
|
||||
// non-final classes.
|
||||
|
||||
|
||||
|
||||
// Another option was to initialize the Collection from an array,
|
||||
// using Arrays.asList() method:
|
||||
@ -926,7 +926,7 @@ import java.security.SecureRandom;
|
||||
public class Lambdas {
|
||||
public static void main(String[] args) {
|
||||
// Lambda declaration syntax:
|
||||
// <zero or more parameters> -> <expression body or statement block>
|
||||
// <zero or more parameters> -> <expression body or statement block>
|
||||
|
||||
// We will use this hashmap in our examples below.
|
||||
Map<String, String> planets = new HashMap<>();
|
||||
|
Loading…
Reference in New Issue
Block a user