Posts

Showing posts from June, 2021

BITWISE OPERATOR

BITWISE OPERATOR package com.company ; public class Main { public static void main ( String [] args ) { //AND operator int x = 10 , y = 6 , z ; z = x & y ; //both bits should be 1 /* x y x&y 0 0 0 0 1 0 1 0 0 1 1 1 */ System . out . println ( "z=x&y : " + z ); //OR bitwise operator z = x | y ; //one of bits should be 1 /* x y x|y 0 0 0 0 1 1 1 0 1 1 1 1 */ System . out . println ( "z=x|y : " + z ); //XOR bitwise operator z = x ^ y ; //only one bits should be 1 /* x y x^y 0 0 0 0 1 0 1 0 0 1 1 0 */ System . out . println ( "z=x^y : " + z ); /*LEFT SHIFT operator * It will double the number by moving 1 place * Automati

Queue

Image
 Queue     Demonstration of queue using linked list in JAVA    package com.company ; import java.util. Queue ; import java.util.LinkedList ; public class Main { public static void main ( String [] args ) { // write your code here Queue < Integer > q = new LinkedList <> (); q . add ( 10 ); q . add ( 1 ); q . add ( 8 ); q . add ( 4 ); q . add ( 7 ); q . add ( 89 ); System . out . println ( "The queue is: " + q ); } } The queue is: [10, 1, 8, 4, 7, 89] Process finished with exit code 0 Show peak of queue    package com.company ; import java.util. Queue ; import java.util.LinkedList ; public class Main { public static void main ( String [] args ) { // write your code here Queue < Integer > q = new LinkedList <> (); q . add ( 6 ); q . add ( 1 ); q . add ( 8 ); q . add ( 4 ); q . add ( 7 ); q . add ( 89 ); System

CREATE UNIT CONVERTER APP

Image
CREATE UNIT CONVERTER APP USING XML AND JAVA IN ANDROID STUDIO xml code :- <? xml version ="1.0" encoding ="utf-8" ?> < androidx.constraintlayout.widget.ConstraintLayout xmlns: android ="http://schemas.android.com/apk/res/android" xmlns: app ="http://schemas.android.com/apk/res-auto" xmlns: tools ="http://schemas.android.com/tools" android :layout_width ="match_parent" android :layout_height ="match_parent" android :background ="#F8E753" tools :context =".MainActivity" > < EditText android :id ="@+id/editTextTextPersonName" android :layout_width ="wrap_content" android :layout_height ="wrap_content" android :ems ="10" android :inputType ="number" android :textColor ="#E91E63" app :layout_constraintBottom_toBottomOf ="parent"

Create table using SQL.

Create table using SQL. SQL > connect Enter user - name : pandey121 Enter password : Connected . SQL > CREATE TABLE COLLEGE_STUDENT1(ID NUMBER , NAME VARCHAR( 20 ) , GENDER VARCHAR( 6 ) , STATE VARCHAR( 10 )); Table created . SQL > DESC COLLEGE_STUDENT1; Name Null ? Type ----------------------------------------- -------- ---------------------------- ID NUMBER NAME VARCHAR2( 20 ) GENDER VARCHAR2( 6 ) STATE VARCHAR2( 10 ) SQL > SQL > INSERT INTO COLLEGE_STUDENT1 VALUES( 1 , 'SHRADDHA NAND PANDEY' , 'MALE' , 'JHARKHAND' ); 1 row created . SQL > INSERT INTO COLLEGE_STUDENT1 VALUES( 2 , 'ARYAN' ,

Dollar to Rupee and Rupee to Dollar app .

Image
Create android app which convert  Dollar to Rupee and Rupee to Dollar app .    Frontend Language :- XML  😀😁    Backend Language : Java        Created By :- Shraddha Nand Pandey        XML CODE : -  <? xml version ="1.0" encoding ="utf-8" ?> <androidx.constraintlayout.widget.ConstraintLayout xmlns: android ="http://schemas.android.com/apk/res/android" xmlns: app ="http://schemas.android.com/apk/res-auto" xmlns: tools ="http://schemas.android.com/tools" android :layout_width ="match_parent" android :layout_height ="match_parent" android :background ="#673AB7" tools :context =".MainActivity" > <ImageView android :id ="@+id/imageView" android :layout_width ="420dp" android :layout_height ="209dp" android :background ="#FEE600" app :layout_constraintBottom_toBottomOf ="pa