Cameron McKenzie
Cameron McKenzie
  • 588
  • 4 936 005
How to code a Java Tic Tac Toe Game Tutorial
Want to learn how to code a Tic Tac Toe game in Java? Look no further.
In this quick Java tutorial on how to code a Java Tic Tac Toe game, we'll show you how to quickly get a console based game up and running.
From there, we'll enhance the logic of the Tic Tac Toe game and refactor the code to make it cleaner and more readable. We'll add some error checking and exception handling to the Java tic tac toe game, and finally we'll test it out and see how it works.
By the way, the source code is over on TheServerSide. There's a full article there on the Java tic tac toe game explaining how it works in a simple and easy to learn, step-by-step manner.
Переглядів: 290

Відео

Complete Java Records Tutorial
Переглядів 6963 місяці тому
This Java Records tutorial is part of the full crash course published over on TheServerSide. Check it out! www.theserverside.com/video/How-Java-17-records-work If you want to learn how to make your code less verbose, while also faster and more efficient at the same time, this Java Records tutorial is for you. We'll cover all the most important Java 17 Records features and show you all the rules...
Java Constructors Tutorial
Переглядів 4623 місяці тому
In Java, a constructor is a special type of method that is automatically called when an object of a class is created. The main purpose of a constructor is to initialize the newly created object. It allows you to set initial values for the object's attributes or perform any other setup tasks necessary for the object to function properly. The syntax of a Java constructor is unique and different f...
How to Push an Existing Project to GitLab
Переглядів 3 тис.4 місяці тому
Need to add an existing project to GitLab? Wondering how to push new code remotely to a GitLab repository? This quick push to GitLab tutorial will show you the various different ways to push a new project to GitLab. The first way is the cheat way, which simply clones a repo, pastes project files in and then does a push. The next way uses Git remote add origin with GitLab. Finally, we I show how...
Git Stash Tutorial ~ How to Shelve Changes for Later
Переглядів 8494 місяці тому
Git Stash is a feature in Git that allows you to save changes that are not ready to be committed but need to be temporarily set aside. This git stash tutorial for beginners will show you exactly how to use git stash to temporary shelve changes. This can be useful when you want to switch branches or work on a different task without committing your current changes. Here are the main commands asso...
How to Convert a Java String to an int or long Primitive Type
Переглядів 2094 місяці тому
In Java, you can convert a String to an int using the parseInt() method of the Integer class or by using the valueOf() method. Here's how: Use Integer.parseInt(): String str = "123"; int number = Integer.parseInt(str); Use Integer.valueOf(): String str = "123"; int number = Integer.valueOf(str); Both methods will throw a NumberFormatException if the string does not contain a parsable integer. Y...
How to Unstage a File in Git - Remove a File from the Staging Index with Restore
Переглядів 5874 місяці тому
To unstage a file in Git, you use the git reset command. Here's how you can do it: Unstage a specific file git reset filename Unstage all files (equivalent to 'git reset') git reset If you want to unstage and also discard changes in the working directory git reset hard Replace "filename" with the actual name of the file you want to unstage. If you want to unstage all files, you can use git rese...
Why Java Uses static & final for Constants
Переглядів 7885 місяців тому
Why Java Uses static & final for Constants
How to EDIT, UNDO or CHANGE the last Git commit message with AMEND
Переглядів 1,1 тис.5 місяців тому
How to EDIT, UNDO or CHANGE the last Git commit message with AMEND
How to Undo a Pushed Git Commit - Reset & Revert a Git Commit After Push
Переглядів 8 тис.5 місяців тому
How to Undo a Pushed Git Commit - Reset & Revert a Git Commit After Push
How to Generate GitHub SSH Keys
Переглядів 8 тис.5 місяців тому
How to Generate GitHub SSH Keys
Generate GitLab SSH Keys & setup SSH on GitLab
Переглядів 9 тис.5 місяців тому
Generate GitLab SSH Keys & setup SSH on GitLab
GitHub URL Example | Learn how to use GitHub URLs & Git
Переглядів 2,2 тис.5 місяців тому
GitHub URL Example | Learn how to use GitHub URLs & Git
Git Set Upstream Example | Learn Branch Management in Git
Переглядів 1,5 тис.5 місяців тому
Git Set Upstream Example | Learn Branch Management in Git
How to use Git Remote Add Origin
Переглядів 4,5 тис.5 місяців тому
How to use Git Remote Add Origin
Git's Fatal Please Tell Me Who You Are Error | Author Identity Unknown | Unable to Auto Detect Email
Переглядів 6145 місяців тому
Git's Fatal Please Tell Me Who You Are Error | Author Identity Unknown | Unable to Auto Detect Email
Learn Git and GitLab Tutorial For Beginners | Full Course [2024]
Переглядів 6 тис.5 місяців тому
Learn Git and GitLab Tutorial For Beginners | Full Course [2024]
Git Login Issues? Keeps Asking for a Username & Password? Permanently Set Credentials in Git Config
Переглядів 3,5 тис.5 місяців тому
Git Login Issues? Keeps Asking for a Username & Password? Permanently Set Credentials in Git Config
Git Config File Tutorial: What, Where, Why and How?
Переглядів 1,9 тис.5 місяців тому
Git Config File Tutorial: What, Where, Why and How?
Learn to Program in Mojo Tutorial for Beginners
Переглядів 3,7 тис.5 місяців тому
Learn to Program in Mojo Tutorial for Beginners
What's the difference between GitHub and Git?
Переглядів 1,3 тис.5 місяців тому
What's the difference between GitHub and Git?
Git and GitHub Crash Course For Beginners | Complete Tutorial [2024]
Переглядів 29 тис.5 місяців тому
Git and GitHub Crash Course For Beginners | Complete Tutorial [2024]
How to Download and Install Java 21
Переглядів 8 тис.5 місяців тому
How to Download and Install Java 21
How to Find All Duplicates in a List in Java
Переглядів 2175 місяців тому
How to Find All Duplicates in a List in Java
How to Download and Install Eclipse
Переглядів 4,3 тис.5 місяців тому
How to Download and Install Eclipse
How to Remove Duplicates from a List in Java
Переглядів 1395 місяців тому
How to Remove Duplicates from a List in Java
Solve the prefix sum puzzle in Java with Arrays, Vectors and even SIMD operations
Переглядів 1715 місяців тому
Solve the prefix sum puzzle in Java with Arrays, Vectors and even SIMD operations
Introduction to the Mojo Programming Language in the Visual Studio Code Editor
Переглядів 5 тис.6 місяців тому
Introduction to the Mojo Programming Language in the Visual Studio Code Editor
How to install Mojo on Windows || Configure Modular's Programming Language & Write your First App
Переглядів 2,6 тис.6 місяців тому
How to install Mojo on Windows || Configure Modular's Programming Language & Write your First App
How to create a Git repository with git init, GitHub and Git GUI tools
Переглядів 4,1 тис.7 місяців тому
How to create a Git repository with git init, GitHub and Git GUI tools

КОМЕНТАРІ

  • @YelleiiKoose
    @YelleiiKoose 2 години тому

    nice vid! also, it is eye-dem-potent not idem-puhtent. www.google.com/search?q=how+to+pronounce+idempotent&oq=how+to+p&gs_lcrp=EgZjaHJvbWUqBggAEEUYOzIGCAAQRRg7MgYIARBFGDkyBwgCEAAYjwIyBwgDEAAYjwIyBggEEEUYQTIGCAUQRRg8MgYIBhBFGEEyBggHEEUYQdIBCDUzOTZqMGoxqAIAsAIA&sourceid=chrome&ie=UTF-8

  • @misti_debu
    @misti_debu 8 годин тому

    not clear

  • @alihosseinkhani2671
    @alihosseinkhani2671 День тому

    great

    • @cameronmcnz
      @cameronmcnz День тому

      Glad I could help! I should probably update this. It's been a while.

  • @ruixue6955
    @ruixue6955 2 дні тому

    2:17 set up my own workflow

  • @JoaoPaulo-ox6pr
    @JoaoPaulo-ox6pr 3 дні тому

    can i use a docker service name instead of an ip address? i was supposed to do a reverse proxy to connect my front-end(React) to my back-end(node.js/express), both running in docker via docker compose, since i can't use the service name on the front-end fetch calls cause the request is send by the browser, so docker cannot parse the service name to an ip address in this situation, how could i fix this?

  • @geriatricprogrammer4364
    @geriatricprogrammer4364 3 дні тому

    As part of a solution where I was unable to push to a remote repository, I was told to pull but first run a stash. After the git stash was completed a message was displayed about one of the commits being skipped. On executing a stash deploy. I found that the file of that commit was now the out of date previous version. Can you please give me some idea why?

  • @prtk2verma
    @prtk2verma 3 дні тому

    ❤❤bro handled it sarcastically

  • @rosaal9030
    @rosaal9030 3 дні тому

    Sir can you please help me i use azuredev and I did revert from there and after that i go to visual studio code and I did git revert then again i did push . I mean i push the unwanted commit again what should I do

  • @dasstraat
    @dasstraat 3 дні тому

    git log shows the commit, how to see the commits one by one for that file?

  • @10ensura
    @10ensura 3 дні тому

    cmd ain't is still there... but remove manually is works ty

  • @sakibcoder
    @sakibcoder 4 дні тому

    : Bro I'm a noob, where I can find the straightforward tutorial? Me: Cameron is there

    • @cameronmcnz
      @cameronmcnz 4 дні тому

      Thanks for the kind words, but honestly, if you're playing around with these settings, and you can configure this type of stuff, you are light-years ahead of any 'noob.' You're welcome to join my team of experts any day of the week!

  • @user_4515xqya
    @user_4515xqya 4 дні тому

    Can't thank you enough; you just saved the day, Bro. ❤

    • @cameronmcnz
      @cameronmcnz 4 дні тому

      Glad I could help! What was your pressing need to do this?

  • @AozenDreyar
    @AozenDreyar 6 днів тому

    can you help me get a job in java or java spring if you please?

  • @AozenDreyar
    @AozenDreyar 6 днів тому

    can you help me get a job in java or java spring?

    • @cameronmcnz
      @cameronmcnz 4 дні тому

      Just learn it and you'll get a job no problem!

  • @nemea6698
    @nemea6698 6 днів тому

    Nice

  • @coffeetea5915
    @coffeetea5915 7 днів тому

    i-it was that easy....Thanks for saving my life sir.

  • @AnanshGupta
    @AnanshGupta 7 днів тому

    Very precise and informative video , thank you

  • @user-lp2uc8hc9g
    @user-lp2uc8hc9g 7 днів тому

    Perfect Tutorial for Beginners.Thanks!

  • @sms_521
    @sms_521 8 днів тому

    that force -f did well for me. thanks

    • @cameronmcnz
      @cameronmcnz 8 днів тому

      Awesome! Now that's best if only you use the repo. If someone else is pushing and pulling, they'll need to re-clone that repo after a forced push. The other option is to rebase, which is safer but a bit more intimidating. Glad I could help!

  • @MartinRadio2
    @MartinRadio2 9 днів тому

    thx !

  • @pwalker1360
    @pwalker1360 9 днів тому

    I grew up using vi, and still use it on Linux a lot.

  • @glenspringle7337
    @glenspringle7337 10 днів тому

    Once question I have...If I start a local repo, and then decide I want it under Bitbucket. How would I do that? How do I put it under Bitbucket without loosing any change history?

    • @cameronmcnz
      @cameronmcnz 10 днів тому

      You'll want to do a git remote add origin. I talk about a 'cheat' method in this video, and honestly, that's the easiest way to do it if you're the only one working on the repo. Instead of git remote add origin, you just create the repo in bitbucket, clone the repo, then copy your files into the repo folder, git add ., git commit -m "first commit" and then a git push. Super easy! ua-cam.com/video/jq1ROBgmEzw/v-deo.html

  • @glenspringle7337
    @glenspringle7337 10 днів тому

    After working with SourceTree for a few years, you explained some of the "features" that I felt were to dangerous to try with my live projects. Knowing that you know what "federalism" is, gives away your Canadian roots. Subscribed!

    • @cameronmcnz
      @cameronmcnz 10 днів тому

      Thanks so much for the kind words! And indeed, I try to slide in a hockey, Tim Hortons or other Canadian reference into all my videos. :)

  • @daisymccarty7822
    @daisymccarty7822 12 днів тому

    100th like on this GitHub SSK Keys tutorial!

  • @daisymccarty7822
    @daisymccarty7822 12 днів тому

    Really make it easy to learn Git and GitHub!

  • @daisymccarty7822
    @daisymccarty7822 12 днів тому

    Makes learning GitLab for beginners so easy.

  • @sambarnes8558
    @sambarnes8558 12 днів тому

    Java and tic tac toe games? What's not to love!

  • @user-qr4kt7dh4m
    @user-qr4kt7dh4m 12 днів тому

    Mojo and VSCode for the win!

  • @user-qr4kt7dh4m
    @user-qr4kt7dh4m 12 днів тому

    Amazing Git and GitHub tutorial for beginners like me!

  • @user-qr4kt7dh4m
    @user-qr4kt7dh4m 12 днів тому

    Mojo is the future of Python.

  • @keifer7813
    @keifer7813 12 днів тому

    You're born to teach, man. Quick question though: What if the bad commit was the first and only commit? Then there's no commit hash before it to "git reset" to. Or is it still possible somehow? 🤔

  • @syamprasadupputalla8233
    @syamprasadupputalla8233 12 днів тому

    Clear and Very helpful

  • @NahiRahman-jr3cs
    @NahiRahman-jr3cs 13 днів тому

    can u make a video on how to learn java? like i have learnt the basics and coded along but still cant do on my mine and i cant understand when to use things...........pls help

  • @EagerEggplant
    @EagerEggplant 13 днів тому

    git submodule update --init --recursive run this at the top level instead of cd'ing into each sub

    • @cameronmcnz
      @cameronmcnz 13 днів тому

      Gonna redo this as it’s a few years old. I’ll include that. Other than better audio, any other tips?

  • @abdelatifben-ichou2830
    @abdelatifben-ichou2830 14 днів тому

    I'am really like the way you teach it makes me happy and focus in your tutorial more , keep going and i'am wish you the best

    • @cameronmcnz
      @cameronmcnz 14 днів тому

      Thanks for the kind words! Honestly, Jenkins is what makes teaching this stuff easy. It's a great tool!

  • @Sagittarius182
    @Sagittarius182 14 днів тому

    UA-cam holds my commentary back for some reason. I think you have to permit it in the commentary section of UA-cam Studio.

    • @cameronmcnz
      @cameronmcnz 14 днів тому

      Is 'commentary' separate from 'comments?' Let me dig into the settings.

    • @cameronmcnz
      @cameronmcnz 14 днів тому

      Feel free to email me if I missed something. My email is on the about page. potemcam hat gmail dot calm

  • @dfsdfsdfdf
    @dfsdfsdfdf 14 днів тому

    Does this include integrating github into jenkins?

    • @cameronmcnz
      @cameronmcnz 14 днів тому

      This Jenkins tutorial of mine does! ua-cam.com/video/OXP8YBPBdgw/v-deo.html

  • @scrumtuous
    @scrumtuous 14 днів тому

    Tic tac toe in Java is great, but when are you going to code a tic tac toe program in Mojo?

    • @cameronmcnz
      @cameronmcnz 14 днів тому

      Java tic tac toe app first. The Mojo tic tac toe app will come second!

  • @VICTORGITAU-do5oh
    @VICTORGITAU-do5oh 14 днів тому

    the way he said "i don't care" 😂😂😂😂😂

    • @cameronmcnz
      @cameronmcnz 14 днів тому

      It's all a lie. I actually do care. Thanks for watching!

  • @Sagittarius182
    @Sagittarius182 15 днів тому

    I already programmed this game .... but not in Java. I made a WPF TicTacToe Game where you play against the computer. It was harder than i initially thought it would be ... especially to code the AI 😊👍

    • @cameronmcnz
      @cameronmcnz 15 днів тому

      Is it published somewhere? GitHub? I just posted my code over on TheServerSide: www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/learn-Java-tic-tac-toe-game-app-program-source-code-beginner-multi-array

  • @Tinubu69
    @Tinubu69 15 днів тому

    Thank you so much

  • @margaderdene9989
    @margaderdene9989 15 днів тому

    great video

    • @cameronmcnz
      @cameronmcnz 15 днів тому

      Thanks for watching! Git gets a lot easier once you've got the basic configuration and upstream branching worked out!

  • @Shut-Up-Lu-Ngu
    @Shut-Up-Lu-Ngu 16 днів тому

    how to use with maven?

  • @abbeydauda7747
    @abbeydauda7747 16 днів тому

    I like the way you teach especially with your good sense of humor, thanks for a job well done

    • @cameronmcnz
      @cameronmcnz 15 днів тому

      Thanks so much! Fact is, Jenkins is so awesome it makes it easy to teach. I'm just a conduit to how cool the tool is. Thanks for viewing!

  • @himanshukandwal8710
    @himanshukandwal8710 17 днів тому

    Excellent. 🎉

  • @AdityaKumar-js6ye
    @AdityaKumar-js6ye 17 днів тому

    can somebody help, it says "There isn’t anything to compare. main and master are entirely different commit histories."

  • @DavidProenca-ch3jw
    @DavidProenca-ch3jw 18 днів тому

    Thank you very much, good sir!

  • @DmitriyChebotarev
    @DmitriyChebotarev 19 днів тому

    Thank you for these lessons from Russia You're a very cool teacher.

    • @scrumtuous
      @scrumtuous 19 днів тому

      Don't stroke his ego! 🤣

    • @cameronmcnz
      @cameronmcnz 16 днів тому

      Thank you so much for the kinds words. But Git and GitHub really make it easy. Regards from Canada!

  • @TLSf553
    @TLSf553 19 днів тому

    Thank you, good sir!

  • @mehdi-vl5nn
    @mehdi-vl5nn 19 днів тому

    How does Multi-Version Concurrency Control (MVCC) integrate with various isolation levels in database systems?