I was addicted to the roll method

The roll method of the Calendar class specifies which part of the date to change in the first argument and the change value in the second argument.

If there is a variable with 4/1 set, what happens to the value of the variable when it is executed with "day" as the first argument and "-1" as the second argument of the roll method?

It is likely to be 3/31 because the day goes back one day, but it will actually be 4/30.

With the add method, it seems to be 3/31.

Recommended Posts

I was addicted to the roll method
I was addicted to the Spring-Batch test
What I was addicted to with the Redmine REST API
The story I was addicted to when setting up STS
About the matter that I was addicted to how to use hashmap
I was addicted to the API version min23 setting of registerTorchCallback
I was addicted to doing onActivityResult () with DialogFragment
[CircleCI] I was addicted to the automatic test of CircleCI (rails + mysql) [Memo]
I was addicted to unit testing with the buffer operator in RxJava
I was a little addicted to the S3 Checksum comparison, so I made a note.
I want to call the main method using reflection
[Rough commentary] I want to marry the pluck method
The part I was addicted to in "Introduction to Ajax in Java Web Applications" of NetBeans
A memorandum because I was addicted to the setting of the Android project of IntelliJ IDEA
I want to use the sanitize method other than View.
I was addicted to using Java's Stream API in Scala
The story I wanted to unzip
Android memo-I was addicted to Permission
What I was addicted to when implementing google authentication with rails
I tried to understand how the rails method "link_to" is defined
[Java] I tried to make a maze by the digging method ♪
I was able to deploy the Docker + laravel + MySQL app to Heroku!
I want to know the Method of the Controller where the Exception was thrown in the ExceptionHandler of Spring Boot
I tried to implement the Iterator pattern
I tried to summarize the Stream API
I went to the Java Women's Club # 1
Why was the code painful to read?
I want to pass the argument of Annotation and the argument of the calling method to aspect
I tried to summarize again the devise that was difficult at first sight
Why Java was the target language I hate
When I wanted to create a method for Premium Friday, it was already in the Java 8 standard API
How to use the replace () method (Java Silver)
I tried to set tomcat to run the Servlet.
I want to truncate after the decimal point
SpringSecurity I was addicted to trying to log in with a hashed password (solved)
[JDBC ③] I tried to input from the main method using placeholders and arguments.
I want to get the value in Ruby
[Ruby basics] How to use the slice method
[Words spelled to me when I was in the first grade ⑩] Please understand the minimum Java coding method. (1st: Naming)
The CSV file that I was able to download suddenly started to appear on the page.
A story I was addicted to when getting a key that was automatically tried on MyBatis
[Ruby] Misunderstanding that I was using the module [Beginner]
GetXxxx of ResultSet was addicted to primitive type (Java)
Addicted to the webpacker that comes standard with Rails 6
I tried to implement the Euclidean algorithm in Java
I want to return the scroll position of UITableView!
I want to simplify the log output on Android
I want to add a delete function to the comment function
About the map method
About the ancestors method
About the to_s method.
A story I was addicted to with implicit type conversion of ActiveRecord during unit testing
16 Corresponds to method invocation
I was addicted to WSl when trying to build an android application development environment with Vue.js
Create a method to return the tax rate in Java
I have summarized the articles that programming beginners referred to.
I tried to summarize the basic grammar of Ruby briefly
I tried to build the environment little by little using docker
I want to put the JDK on my Mac PC
I want to give a class name to the select attribute
I was confused because there was a split in the Array