Skip to content

Commit 8793ec0

Browse files
committed
first commit
0 parents  commit 8793ec0

File tree

147 files changed

+7341
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+7341
-0
lines changed

.gitignore

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
/target/
2+
!.mvn/wrapper/maven-wrapper.jar
3+
4+
### STS ###
5+
.apt_generated
6+
.classpath
7+
.factorypath
8+
.project
9+
.settings
10+
.springBeans
11+
.sts4-cache
12+
13+
14+
# Created by https://www.gitignore.io/api/git,java,maven,eclipse,windows
15+
16+
### Eclipse ###
17+
18+
.metadata
19+
bin/
20+
tmp/
21+
*.tmp
22+
*.bak
23+
*.swp
24+
*~.nib
25+
local.properties
26+
.settings/
27+
.loadpath
28+
.recommenders
29+
30+
# External tool builders
31+
.externalToolBuilders/
32+
33+
# Locally stored "Eclipse launch configurations"
34+
*.launch
35+
36+
# PyDev specific (Python IDE for Eclipse)
37+
*.pydevproject
38+
39+
# CDT-specific (C/C++ Development Tooling)
40+
.cproject
41+
42+
# CDT- autotools
43+
.autotools
44+
45+
# Java annotation processor (APT)
46+
.factorypath
47+
48+
# PDT-specific (PHP Development Tools)
49+
.buildpath
50+
51+
# sbteclipse plugin
52+
.target
53+
54+
# Tern plugin
55+
.tern-project
56+
57+
# TeXlipse plugin
58+
.texlipse
59+
60+
# STS (Spring Tool Suite)
61+
.springBeans
62+
63+
# Code Recommenders
64+
.recommenders/
65+
66+
# Annotation Processing
67+
.apt_generated/
68+
69+
# Scala IDE specific (Scala & Java development for Eclipse)
70+
.cache-main
71+
.scala_dependencies
72+
.worksheet
73+
74+
### Eclipse Patch ###
75+
# Eclipse Core
76+
.project
77+
78+
# JDT-specific (Eclipse Java Development Tools)
79+
.classpath
80+
81+
# Annotation Processing
82+
.apt_generated
83+
84+
.sts4-cache/
85+
86+
### Git ###
87+
# Created by git for backups. To disable backups in Git:
88+
# $ git config --global mergetool.keepBackup false
89+
*.orig
90+
91+
# Created by git when using merge tools for conflicts
92+
*.BACKUP.*
93+
*.BASE.*
94+
*.LOCAL.*
95+
*.REMOTE.*
96+
*_BACKUP_*.txt
97+
*_BASE_*.txt
98+
*_LOCAL_*.txt
99+
*_REMOTE_*.txt
100+
101+
### Java ###
102+
# Compiled class file
103+
*.class
104+
105+
# Log file
106+
*.log
107+
108+
# BlueJ files
109+
*.ctxt
110+
111+
# Mobile Tools for Java (J2ME)
112+
.mtj.tmp/
113+
114+
# Package Files #
115+
*.jar
116+
*.war
117+
*.nar
118+
*.ear
119+
*.zip
120+
*.tar.gz
121+
*.rar
122+
123+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
124+
hs_err_pid*
125+
126+
### Maven ###
127+
target/
128+
pom.xml.tag
129+
pom.xml.releaseBackup
130+
pom.xml.versionsBackup
131+
pom.xml.next
132+
release.properties
133+
dependency-reduced-pom.xml
134+
buildNumber.properties
135+
.mvn/timing.properties
136+
.mvn/wrapper/maven-wrapper.jar
137+
138+
### Windows ###
139+
# Windows thumbnail cache files
140+
Thumbs.db
141+
ehthumbs.db
142+
ehthumbs_vista.db
143+
144+
# Dump file
145+
*.stackdump
146+
147+
# Folder config file
148+
[Dd]esktop.ini
149+
150+
# Recycle Bin used on file shares
151+
$RECYCLE.BIN/
152+
153+
# Windows Installer files
154+
*.cab
155+
*.msi
156+
*.msix
157+
*.msm
158+
*.msp
159+
160+
# Windows shortcuts
161+
*.lnk
162+
163+
### IntelliJ IDEA ###
164+
.idea
165+
*.iws
166+
*.iml
167+
*.ipr
168+
169+
### NetBeans ###
170+
/nbproject/private/
171+
/nbbuild/
172+
/dist/
173+
/nbdist/
174+
/.nb-gradle/
175+
build/
176+
!**/src/main/**/build/
177+
!**/src/test/**/build/
178+
179+
### VS Code ###
180+
.vscode/
181+
182+
### Some additional ignores (sort later)
183+
*.DS_Store
184+
*.sw?
185+
.#*
186+
*#
187+
*~
188+
.classpath
189+
.project
190+
.settings
191+
bin
192+
build
193+
target
194+
dependency-reduced-pom.xml
195+
*.sublime-*
196+
/scratch
197+
.gradle
198+
README.html
199+
*.iml
200+
.idea
201+
.exercism

ArrayList/ArrayList_Tutorial.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package ArrayList;
2+
3+
import java.util.ArrayList;
4+
import java.util.List;
5+
6+
public class ArrayList_Tutorial {
7+
public static void main(String[] args) {
8+
List<Integer> numberList = new ArrayList<>();
9+
numberList.add(10);
10+
numberList.add(20);
11+
numberList.add(30);
12+
numberList.add(40);
13+
System.out.println(numberList);
14+
System.out.println(findNumber(numberList, 30));
15+
System.out.println(deleteNumber(numberList, 30));
16+
System.out.println(numberList);
17+
System.out.println(insertNumber(numberList, 40));
18+
System.out.println(numberList);
19+
}
20+
21+
// Accessing elements if statement // .get() // arraylist if.contains // object for if.equals
22+
// arrayList.indexOf
23+
public static boolean findNumber(List<Integer> numberList, int numb){
24+
if (numberList.contains(numb)) {
25+
return true;
26+
}
27+
return false;
28+
}
29+
public static boolean deleteNumber(List<Integer> numberList, int numb){
30+
if (numberList.contains(numb)) {
31+
numberList.remove(numberList.indexOf(numb));
32+
return true;
33+
}
34+
return false;
35+
}
36+
37+
private static boolean insertNumber(List<Integer> numberList, int numb) {
38+
if (!(numberList.contains(numb))) {
39+
numberList.add(numb);
40+
return true;
41+
}
42+
return false;
43+
}
44+
}

0 commit comments

Comments
 (0)