Posts

Showing posts from December, 2023

String Class in Java

String class in Java: String:                 1. String is a sequence of character enclosed within double quote.                 2. String class is a non- premitive data type.                 3. String class present in a java.lang package.                 4. String is a immutable                       i.e when we create a String object then we can't change in it.                            that means we can assign new value to that String object but we can't  perform any                                                 change in previous value.         ...

Pattern Programs

  Java Pattern Programs package MyJavaPackage; public class Pattern1 { public static void main (String[] args) { char ch= 'A' ; char changeChar= 'A' ; for ( int i= 1 ; i<= 5 ; i++) { for ( int j= 1 ; j<= 5 ; j++) { if (j<=i) { System. out .print(ch); ch++; } else { System. out .print(changeChar); } } ch= 'A' ; changeChar++; System. out .println(); } } } /* AAAAA ABBBB ABCCC ABCDD ABCDE */ package MyJavaPackage; public class Pattern2 { public static void main (String[] args) { int change= 5 ; for ( int i= 1 ; i<= 5 ; i++) { for ( int j= 1 ; j<= 5 ; j++) { if (j == change) System. out .print(...

MCS Advanced Database & Web Technology

Image
  MCS Advanced Database & Web Technology Slip 1: Write the HTML5 code for generating the form as shown below. Apply the internal CSS to the following form to change the font size of the heading to 6pt and change the color to red and also change the background color to yellow. <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < meta name = "viewport" content = "width=device-width, initial-scale=1.0" >     < title > Project Management Form </ title >     < style >         body {             font-family : Arial , sans-serif ;             background-color : #f8f8f8 ;             margin : 0 ;             padding : 0 ;         }         form {           ...