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
HP@Gaurav MINGW64 /e/directory/example (master) | |
$ git status | |
On branch master | |
Your branch is up-to-date with 'origin/master'. | |
Changes to be committed: | |
(use "git reset HEAD <file>..." to unstage) | |
modified: README.md |
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
HP@Gaurav MINGW64 /e/directory/example (master) | |
$ git branch | |
* master | |
new_branch | |
HP@Gaurav MINGW64 /e/directory/example (master) | |
$ |
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
HP@Gaurav MINGW64 /e/directory/example (master) | |
$ git pull | |
remote: Enumerating objects: 4, done. | |
remote: Counting objects: 100% (4/4), done. | |
remote: Compressing objects: 100% (3/3), done. | |
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 | |
Unpacking objects: 100% (3/3), done. | |
From https://github.com/gauravkukade/example | |
15e8755..d7aefb1 master -> origin/master | |
Updating 15e8755..d7aefb1 |
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
HP@Gaurav MINGW64 /e/directory/example (master) | |
$ git push origin master | |
fatal: HttpRequestException encountered. | |
An error occurred while sending the request. | |
Username for 'https://github.com': gauravkukade | |
Counting objects: 2, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (2/2), done. | |
Writing objects: 100% (2/2), 255 bytes | 255.00 KiB/s, done. | |
Total 2 (delta 1), reused 0 (delta 0) |
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
/** | |
* A Java program to convert StringBuilder to String | |
* @author Gaurav Kukade at cderlls.com | |
* | |
*/ | |
public class StringBuilderToString { | |
public static void main(String[] args) { | |
StringBuilder stringBuilder = new StringBuilder("Hello "); | |
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
import java.util.UUID; | |
/** | |
* A Java program to create a Randomly Generated UUID i.e. Version 4 UUID | |
* @author Gaurav Kukade at coderolls.com | |
* | |
*/ | |
public class CreateUUID { | |
public static void main(String[] args) { |
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
class java.util.ArrayList | |
class java.lang.String | |
java.lang.String |
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
//If you want to check if an object implements a particular interface or extends a particular class (e.g. String, ArrayList, etc), you can use the `instanceof` keyword. | |
// check blogpost https://coderolls.com/determine-a-datatype-in-groovy/ | |
def blogname = '''coderolls'''; | |
println (blogname instanceof String) // true | |
println (blogname instanceof ArrayList) // false |
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
import java.sql.Timestamp; | |
import java.time.Instant; | |
import java.util.Date; | |
/** | |
* A Java Program to get current timestamp using using the java.time.Instant | |
* | |
* @author Gaurav Kukade at coderolls.com | |
* | |
*/ |
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
import java.sql.Timestamp; | |
import java.util.Date; | |
/** | |
* A Java program to get the current timestamp using java.sql.Timestamp | |
* | |
* @author Gaurav Kukade at coderolls.com | |
* | |
*/ | |
public class TimestampExample { |