জয়েন লগইন

জাভা getMonth

🌈জাভা getMonth কি?

📋জাভা getMonth হলো মাসের মান বের করার পদ্ধতি।

⚒️জাভা getMonth মাসের মান বের করতে ব্যবহৃত হয়।

জাভা getMonth মাসের মান বের করার উদাহরণ।

java
import java.time.LocalDateTime;
public class Main {
  public static void main(String[] args) {
  
  LocalDateTime dateTime = LocalDateTime.now();

  System.out.println(dateTime.getMonth());
  }
}