संदेश

#1 Why should we Learn Java ? What is java ? Why java is popular ? Part of Java Language

चित्र
  package com.sudhirtheindian2.java123 ; public class why_learn_java { public static void main (String[] args) { // 1 why learn java language // 2 parts of java // 3 why java so popular // 4 what is java // why learn java language ? // 1 it is simple and easy to learn // 2 it is open source // 3 it is plateform independent(windows,mac,linux) // 4 it is secure because it generates bytecode // 5 it is embeded (some parts in java or other language) // // 6 it is compiled and interpreted // (first compile the program and generate bytecode // after that it interprate the byte code and give output) // 7 it is robust programming language // it has garbage collector // garbage collector destroy unused object and // it does not waste memory // 8 large memory & framework // (maximum source code has written already only use) // parts of java ...

#25 How to use Break , Continue & Return in java | Transfer Control Flow Statement in java

चित्र
  package com.sudhirtheindian2.java123 ; public class transfer { public static void main (String[] args) { // What is transfer control flow statement in java language // 1 break // 2 continue // 3 return return value in method ////// use of break // for (int i =1; i<=10;i++){ // if(i==4) // break; // System.out.println(i); // } // for ( int i = 1 ; i<= 10 ; i++){ if (i== 5 ) continue; System. out .println(i) ; } } }

Intro Video

चित्र
 

HackerRank Java String Reverse Problem Solution

  HackerRank  Java String Reverse Problem Solution  A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. Given a string  , print  Yes  if it is a palindrome, print  No  otherwise. Constraints  will consist at most   lower case english letters. Sample Input madam Sample Output Yes Solution 1: import  java.io.*; import  java.util.*; public   class  Solution {      public   static   void  main(String[] args) {                        Scanner scanner =  new  Scanner(System.in);                String s = scanner.next();               ...

HackerRank Java Substring Problem Solution

चित्र
  HackerRank Java Substring Problem Solution  Given a string,  , and two indices,   and  , print a  substring  consisting of all characters in the inclusive range from   to  . You'll find the  String  class' substring method  helpful in completing this challenge. Input Format The first line contains a single string denoting  . The second line contains two space-separated integers denoting the respective values of   and  . Constraints String   consists of English alphabetic letters (i.e.,  ) only. Output Format Print the substring in the inclusive range from   to  . Sample Input Helloworld 3 7 Sample Output lowo Explanation In the diagram below, the substring is highlighted in  green : Solution : import  java.io.*; import  java.util.*; import  java.text.*; import  java.math.*; import  java.util.regex.*; public   class ...