git init :- to initilise the commuit git status :- status check karna ka lia git add (then file name) :- git add sa hum file add karsakta haa git add file ka name ls :- check karna ka lia git add sa phela wo stage pe ata haa then we have git commit for committing git commit -m "initial commit" //git add file name ka bade git commit -m "initial commit" karna padta haa cmd + k / clear //clear karna ka lia git log :- Git log is a utility tool to review and read a history of everything that happens to a repository . git add . karna sa sari file staging area mae ajaying ge git log will show all commites git checkout 15ebcb8e1d62939377b5a2444ecd807e305a681e (has commit wala ) particular commit ko check karna ka lia git checkout master //pura wapas ajaya ga git branch // particular branch pe chala jaya ga branch ...
Bubble short assening order 5 9 8 -2 1 1st titration 4 comparison 2nd itteretion 3 comparison and so on comparison = n-i; public class BubbleSortExample { static void bubbleSort( int [] arr) { int n = arr.length; int temp = 0 ; for ( int i= 0 ; i < n; i++){ for ( int j= 1 ; j < (n-i); j++){ if (arr[j- 1 ] > arr[j]){...
// Java Program to Check Whether String contains Special // Characters Using Character Class // Importing input output classes import java.io.*; // Main class class GFG { // Method 1 // Main driver method public static void main(String[] args) { // Declaring and initializing count for // special characters int count = 0; // Input custom string String s = "!#$GeeeksforGeeks.Computer.Science.Portal!!"; // Iterating through the string // using standard length() method for (int i = 0; i < s.length(); i++) { // Checking the character for not being a // letter,digit or space if (!Character.isDigit(s.charAt(i)) && !Character.isLetter(s.charAt(i)) && !Character.isWhitespace(s.charAt(i))) { // Incrementing the countr for spl // characters by unity count++; } } // When there is no special character encounterd if (count == 0) // Display the print statement System.out.println...
Comments
Post a Comment