Soluții

Java Program to check Vowel or Consonant using Switch Case

The alphabets A, E, I, O and U (smallcase and uppercase) are known as Vowels and rest of the alphabets are known as consonants. Here we will write a java program that checks whether the input character is vowel or Consonant using switch case in java.

In this program we are not using break statement with cases intentionally, so that if user enters any vowel, the program continues to execute all the subsequent cases until Case 'U' is reached and thats where we are setting up the value of a boolean variable to true. This way we can identify that the alphabet entered by user is vowel or not.

[mai mult...]

Java Program to check Leap Year

Before we see the program, lets see how to determine whether a year is a leap year mathematically:
To determine whether a year is a leap year, follow these steps:
1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4. The year is a leap year (it has 366 days).
5. The year is not a leap year (it has 365 days).

[mai mult...]

How to Read and Print an Integer value in Java

In below program, the syntax and procedures to take the integer as input from the user is shown in Java language. Steps:

  1. The user enters an integer value when asked.
  2. This value is taken from the user with the help of nextInt() method of Scanner Class. The nextInt() method, in Java, reads the next integer value from the console into the specified variable. Syntax:
  3. variableOfIntType = ScannerObject.nextInt();
  4. where variableOfIntType is the variable in which the input value is to be stored. And ScannerObject is the beforehand created object of the Scanner class.
    1. This entered value is now stored in the variableOfIntType.
    2. Now to print this value, System.out.println() or System.out.print() method is used. The System.out.println() method, in Java, prints the value passed as the parameter to it, on the console screen and the changes the cursor to the next line on the console. Whereas System.out.print() method, in Java, prints the value passed as the parameter to it, on the console screen and the cursor remains on the next character of the last printed character on the console.
[mai mult...]

How to add Yoga Mode to your Samsung Galaxy Watch

The Samsung Galaxy Watch is one of the popular smartwatches with Yoga mode. It helps you track vital metrics while doing yoga. While the mode isn’t directly preloaded on the watch, you can add it to your workout modes screen with a few simple taps.

When you add the yoga mode to your Galaxy Watch and start it, you can see essential stats like average heart rate, maximum heart rate, and more on the screen. Before starting the yoga workout mode, you can also set a target for calories or time duration.

After starting, you will see the time duration on the watch screen with calories burnt and heart rate data. Scrolling down will also see a detailed heart rate data chart with average and maximum heart rates during the session.

[mai mult...]

How to enable & use Google Maps Navigation on Wear OS

Google’s Wear OS also supports turn-by-turn GPS navigation with real-time updates. This can be handy when cycling or driving with your phone in your pocket. If you have a smartwatch running Wear OS, such as Galaxy Watch, Pixel Watch, or TicWatch, here’s how you can enable and use Google Maps navigation.

Enable Turn-by-Turn Google Maps Navigation on Wear OS

You can use multiple Google services on smartwatches running on Google’s Wear OS. This includes apps like Google Fit, Contacts, Google Home, Google Keep, Google Camera, and Maps. To use turn-by-turn navigation on your smartwatch, follow the steps below:

[mai mult...]

How to use Camera Controller on your Samsung Galaxy Watch

The Samsung Galaxy Watch 4 and 5 are feature-packed smartwatches running Google’s Wear OS. With a recent software update, our Galaxy Watch 4 has received the camera control to remotely capture pictures and change zoom levels on your phone. In this article, let’s see how to use Camera Controller on Samsung Galaxy Watch 4 and 5.

How to Use Camera Controller on Galaxy Watch

The camera control feature on the Galaxy Watch 4 and 5 has arrived with the latest software update. You can now use your Galaxy Watch 4 or 5 to click photos on your phone with a preview screen on the watch itself.

It is more like the Camera control feature on Apple Watch. You can check the live preview of the image on the watch that your phone’s camera is seeing. This makes it more useful as it looks like you are using the camera directly on your Galaxy Watch.

[mai mult...]