Sort by

recency

|

202 Discussions

|

  • + 0 comments
    class MyBook extends Book{
        void setTitle(String s){
            super.title=s;
        }
            
        }
    
  • + 0 comments

    `Optimal solution for this problem | Easy to Understand

    abstract class Book{
       abstract void setBooktitle(String s);
    }
    class MyBook extends Book{
        @Override
        void setBooktitle(String s){
            System.out.println("The title is: " + s);
        }
    }
    
    public class Solution {
    
        public static void main(String[] args) {
            /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
            Scanner sc = new Scanner(System.in);
            String str = sc.nextLine();
            MyBook book = new MyBook();
            book.setBooktitle(str);
    
        sc.close();
    }
    

    } `

  • + 0 comments

    import java.util.*; abstract class Book{ String title; abstract void setTitle(String s); String getTitle(){ return title; } }

    //Write MyBook class here

    // class Mybook, khong can public--Step1 class MyBook extends Book{ // dung tu khoa extend de ke tua lop abstract Book--Step2 @Override // ghi de method setTitle voi tham so, va tao body goi s --Step3 public void setTitle(String s){ this.title = s; }

    }

    public class Main{

    public static void main(String []args){
        //Book new_novel=new Book(); This line prHMain.java:25: error: Book is abstract; cannot be instantiated
        Scanner sc=new Scanner(System.in);
        String title=sc.nextLine();
        MyBook new_novel=new MyBook();
        new_novel.setTitle(title);
        System.out.println("The title is: "+new_novel.getTitle());
        sc.close();
    
    }
    

    }

  • + 0 comments

    Contrary to some misconceptions, VoIP can offer superior call quality compared to traditional phone lines, provided the network infrastructure is robust. Advanced VoIP systems use high-definition (HD) voice technology, which delivers clearer and more natural-sounding calls. Additionally, many VoIP providers offer Quality of Service (QoS) features that prioritize voice traffic over other types of internet data, minimizing issues like latency help, jitter, and packet loss. This focus on call quality ensures a reliable and professional communication experience.

  • + 0 comments
    class MyBook extends Book{
         void setTitle(String s){
            this.title = s;
        }
    }